import math def log(n): return math.log2(n)-int(math.log2(n)) N=int(input()) a=1 b=1 half=int(N/2) while a<=half: b=N-a if log(a)==0 or log(b)==0: a+=1 else: break if a>half: print(-1) else: print('%d %d'%(a,b))