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