def main(): print(0, 0) a = int(input()) if a == 0: exit() print(0, 100000) b = int(input()) if b == 0: exit() x = (a + b - 100000) // 2 y = a - x print(x, y) if __name__ == "__main__": main()