import sys sys.setrecursionlimit(10000000) MOD = 10 ** 9 + 7 INF = 10 ** 15 def ask(x,y): print(x,y,flush = True) d = int(input()) if d == 0: exit() return d d1 = ask(0,0) d2 = ask(d1,0) ask(d1 - d2//2,d2//2)