# No.687 E869120 and Constructing Array 1 n = int(input()) for a1 in range(1, 10 + 1): if n - a1 <= 10: print('{0} {1}'.format(a1, n - a1)) break