# coding: utf-8 N = int(input()) if N > 10: print(N-10,10) else: print(N-1, 1)