print(0, 0, flush = True) a = int(input()) if a == 0: exit() print(0, 100000, flush = True) b = int(input()) if b == 0: exit() x = (a + b - 100000) // 2 y = a - x print(x, y)