n=int(input()) for q in range(1,11): for w in range(1,11): if q+w==n: print(q,w) exit()