x = int(input())
y = int(input())

def f(a,b):
    return a - b

print(f(x,y),f(y,x),sep = '\n')