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