N = int(input()) a1,a2 = 1,0 while a1 <= 10: if 1 <= (N - a1) and (N - a1) <= 10: a2 = (N - a1) break a1 += 1 print(a1,a2)