#include #include #include #include #include using namespace std; const bool TEST=false; int manhattan(int x1,int y1,int x2,int y2){ return abs(x1-x2)+abs(y1-y2); } int getcount=0; int get(int x,int y){ getcount++; if(TEST){ return manhattan(x,y,8101919,364364); } printf("%d %d\n",x,y); fflush(stdout); int mh; int _=scanf("%d",&mh); return mh; } int main(){ int x,y; int l,r; l=get(0,0); r=get(0x7fffffff,0); if(TEST) printf("%d %d\n",l,r); x=(l-(r-0x7fffffff))>>1; y=l-x; printf("%d %d\n",x,y); if(TEST){ printf("getcount=%d\n",getcount); } return 0; }