N = int(input()) power_of_2 = set() i = 1 while i <= N: power_of_2.add(i) i *= 2 for a in range(1, N//2+1): if a not in power_of_2 and (N-a) not in power_of_2: print(a, N-a) exit() print(-1)