n = int(raw_input()) for i in range(1,11): j = n - i if 1 <= j and j <= 10: print i,j break