N = int(input()) for i in range(2,min(100,N)): if i in [1,2,4,8,16,32,64]: continue st = 1 res = N-i flg = 1 for k in range(100): p = pow(2,k) if p > res: break if p == res: flg = 0 break if flg: print(i,res) exit() print(-1)