import sys input = sys.stdin.readline A=[2**i for i in range(64)] N=int(input()) for a in range(1,N): b=N-a if not (a in A) and not (b in A): print(a,b) exit() print(-1)