n = int(input())
for i in range(1, n):
    if 1 <= i <= 10 and 1 <= n-i <= 10:
        print(i, n-i)
        exit()