def cal(a,b):
    return a-b
x = int(input())
y = int(input())
print(cal(x,y))
print(cal(y,x))