print(0, 0, flush=True) d = int(input()) print(0, d, flush=True) e = int(input()) e -= d print((d + e) // 2, (d - e) // 2, flush=True)