n=int(input()) print(1,n-1)if n<11 else print(10,10)if n == 20 else print(10,n%10)