N = int(input()) if N > 11: print(N-10,10) else: print(N-1,1)