ll@(ai,af,bi,bf); ll afn,afa[64],afs[64]; afn=Factor(ai*1d4+af,afa,afs); bool saw2=false,saw5=false; rep(i,afn){ ll x=afs[i]; if(afa[i]==2){ saw2=true; x-=4; } if(afa[i]==5){ saw5=true; x-=4; } if(x<0){ wt("No"); exit(0); } if(x*(bi*1d4+bf)%1d4){ wt("No"); exit(0); } } wt("Yes");