N = int(input()) for a1 in range(1,10+1): a2 = N-a1 if 1<=a2<=10: print(a1,a2) break