ll@q; rep(q){ ll@d,@k--; if(d==0){ if(k==0){ wt("Yes"); wt("0 0"); }else{ wt("No"); } }else{ k/=4; if(k>=d){ wt("No"); }else{ wt("Yes"); ll x=d/2-k/2; if(k&1)x=d+1-x; wt(x,d-x); } } }