#include unsigned int ask(unsigned int x,unsigned int y){ printf("%u %u\n",x,y); fflush(stdout); unsigned int d=0; char c; while((c=getchar())!=EOF){ d=10*d+c-'0'; } return d; } void run(void){ unsigned int d=ask(0,0); if(d==0) return; unsigned int e=ask(0,d); if(e==0) return; unsigned int a=d-e/2; unsigned int b=e/2; if(a>0){ ask(a,b); } else { ask(e,0); } return; } int main(void){ run(); return 0; }