ll@n,@k; ull m=~0; while(!(k&1))k>>=1,m<<=1; m=~m; ll f[32],g[],e=Factor(k,f,g),h[]{},h2=0; ull et[],ei[]; rep(j,e){ ull p=f[j]**g[j]; et[j]=~0ull/p; ull x=p; rep(5)x*=2-p*x; ei[j]=x; } rep(n){ ll@a; h2|=!(a&m); rep(j,e){ h[j]=h[j]||a*ei[j]<=et[j]; } } wt(min(h2,h(e))?"Yes":"No");