X=Y=0#origin P=100000#border c=100 while c: print(X+P,Y); r=input() print(X-P,Y); l=input() print(X,Y+P); u=input() print(X,Y-P); w=input() P//=2 if r==min(r,l,u,w):X=X+P elif l==min(r,l,u,w):X=X-P elif u==min(r,l,u,w):Y=Y+P elif w==min(r,l,u,w):Y=Y-P c-=1