import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines sys.setrecursionlimit(10 ** 7) n = int(readline()) ab = [2 ** i for i in range(60)] for i in range(1, n): if i not in ab and (n - i) not in ab: print(i, n - i) break else: print(-1)