N = int(input()) two = 1 S = set() for i in range(65): S.add(two) two *= 2 for i in range(1, 10000): if i in S: continue if N - i not in S and N - i >= 1: print(i, N - i) exit() print(-1)