N = int(input()) for i in range(1, 11): for j in range(1, 11): if i + j == N: print(i, j) exit()