def main(): xmin = 0 xmax = 100000 ymin = 0 ymax = 100000 while True: x = xmin + (xmax - xmin) // 2 print(x, 0) ret1 = int(input()) print(x + 1, 0) ret2 = int(input()) if ret1 < ret2: xmax = x else: xmin = x if xmax - xmin <= 1: y = ret1 break print(x, y) main()