N = int(input()) a1,a2=0,0 if N > 10: a1 = 10 a2 = N - a1 else: a1 = N - 1 a2 = 1 print('{0} {1}'.format(a1,a2))