N = int(input()) x = 1 S = {x} while x << 1 < N: x <<= 1 S.add(x) for i in range(1,N): if i in S: continue if N - i in S: continue print(i,N-i) exit() print(-1)