n = int(input()) if n == 20: print(10, 10) else: print(9, n-9)