#include #include #define maxn 205 using namespace std; int n=200; int a[maxn][maxn]; int ok=1; void det(int x1,int y1,int x2,int y2) { if(!ok) return; int mx=(x1+x2)/2, my=(y1+y2)/2; printf("%d %d\n",mx,my); fflush(stdout); int val; scanf("%d",&val); if( val==0 ) {ok=0; return;} if(x1==x2 && y1==y2) return; if( val>0 ) { if(my-1>=y1) det(mx,y1,x2,my-1); if(!ok) return; if(mx-1>=x1) det(x1,my,mx-1,y2); if(!ok) return; if(mx-1>=x1 && my-1>=y1) det(x1,y1,mx-1,my-1); if(!ok) return; } else { if(my+1<=y2) det(x1,my+1,mx,y2); if(!ok) return; if(mx+1<=x2) det(mx+1,y1,x2,my); if(!ok) return; if(mx+1<=x2 && my+1<=y2) det(mx+1,my+1,x2,y2); if(!ok) return; } } int main() { det(0,0,n-1,n-1); return 0; }