import math n = int(input()) for i in range(1, n//2+1): if math.frexp(i)[0] == 0.5: continue elif math.frexp(n-i)[0] != 0.5: print(i, n-i) exit() print('-1')