N = int(input()) def is_pow2(x): while x > 0 and x % 2 == 0: x //= 2 return x == 1 for i in range(1, N): x, y = i, N - i if not is_pow2(x) and not is_pow2(y): print(x, y) exit() print(-1)