print(0,0) a = int(input()) if a == 0: exit(0) print(10**9,0) b = int(input()) if b == 0: exit(0) y = (a + b - 10**9) // 2 x = a - y print(x,y)