#coding utf-8 N = int(input()) for i in reversed(range(1,11)): if 0 < N - i <= 10: print (N - i, i) break