//interactive ll a,b; ll m(ll x,ll y){ if(a==x||b==y||a+b==x+y||a-b==x-y){ a=x; b=y; wt(a,b); return 1; } return 0; } { ll@t; rep(t){ ll@h,@w; a=1; b=1; while(1){ ll@x,@y; if(x==0){ break; } m(x-1,y)||m(x,y-1)||m(x-2,y)||m(x,y-2)||(x