import math N = int(input()) findNum = False top = 0 bottom = 0 for i in range(1, int(N/2) + 1): 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")