N = int(input()) l = [10, 9, 8, 7, 6, 5, 4, 3, 2, 1] for i in range(len(l)): if N - l[i] > 0: print(l[i],N - l[i]) break