n=int(input()) a=2 b=n-2 l=[] for i in range(100): l.append(2**i) c=n//2 check=False while a<=c: a+=1 b+=1 if a not in l and b not in l: check=True break if check: print(a,b) else: print("-1")