#简洁

def  cal(x, y):
 return x-y

a = int(input())
b = int(input())
print(cal(a,b) , cal(b,a),sep='\n')