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