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