import sys def query(p): print(p[0],p[1]) sys.stdout.flush() return int(input()) l,r = -1,100000+1 for i in range(40): L=query(((l*2+r)//3,0)) R=query(((l+r*2)//3,0)) if L == 0 or R == 0: find=True break if L < R: r = (l+r*2)//3 else: l = (l*2+r)//3 if not find: y=query(((l+r*2)//3,0)) x=(l+r*2)//3 query((x,y))