n=int(input()) a=[-1] for i in [1,3,5]: x=n-i if x&(x-1)>0:a=[i,x] print(*a)