print(0, 0, flush=True) d1 = int(input()) n = 1000000000 print(0, n, flush=True) d2 = int(input()) y = ((d1 + d2) - n // 2) x = d1 - y print(y, x)