def sum_sub(x,y):
    sum=x+y
    sub=x-y
    print("{}\n{}".format(sum,sub))
x=int(input())
y=int(input())
sum_sub(x,y)