N = int(input()) for i in range(1, 11): b = N - i if 1<=b<=10: print(i, b) exit()