{ll@n,@h;rep(n){ll@a;h/=gcd(h,a);}wt(h-1?"NO":"YES");}