x = int(input())
y = int(input())
print(x+y, x-y, sep='\n')
# print(x+y)
# print(x-y)