import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N = int(read()) for x in range(1,11): y = N - x if 1 <= y <= 10: break print(x,y)