import math N = int(input()) r = 0 if N%2 == 0: r = N/2 else: r = N//2 + 1 findNum = False top = 0 bottom = 0 for i in range(1, r): top = i bottom = N - i res1, _ = math.modf(math.log2(top)) res2, _ = math.modf(math.log2(bottom)) if res1 != 0 and res2 != 0: findNum = True break if findNum: print(top, " ", bottom) else: print("-1")