ll@(ai,af,bi,bf); ll b=bi*1d4+bf*(bi<0?-1:1); 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; } x*=b; if(x<0){ wt("No"); exit(0); } if(x%1d4){ wt("No"); exit(0); } } if(!saw2||!saw5){ ll x=-4*b; if(x<0){ wt("No"); exit(0); } if(x%1d4){ wt("No"); exit(0); } } wt("Yes");