A, B = map(int, input().split()) for x in range(100): for y in range(100): if A + x == 10 and x + y == B: print(x, y)