N=int(input()) list2=[] for i in range(60): list2.append(2**i) for j in range(1,1000): if j==N: print(-1) exit() elif j in list2: pass elif N-j in list2: pass else: print(j,N-j) exit()