A,B = map(int, input().split()) print(10-A,A+B-10)