seen = set() for i in range(61): seen.add(pow(2, i)) n = int(input()) for a in range(1, n // 2 + 1): b = n - a if a in seen or b in seen: continue print(a, b) exit() print(-1)