def check(x): cnt = 0 while x > 0: if x % 2 == 1: cnt += 1 x = x >> 1 if cnt >= 2: return False else: return True n = int(input()) for i in range(3 , n + 1): if check(i) == False and check(n - i) == False: print(i , n - i) exit() print(-1)