n = int(input()) for i in range(1, min(n, 20)): j = n - i if i & -i != i and j & -j != j: print(i, j) break else: print(-1)