N = int(input())
for i in range(1,N+1) :
    if (1 <= i <= 10) and (1 <= N-i <= 10) :
        print(i,N-i)
        break