N = int(input())

if N > 11:
    print('{0} {1}'.format(10, N - 10))
else:
    print('{0} {1}'.format(1, N - 1))