n=gets.to_i;puts ([[3,n-3],[5,n-5]].find{|x,y|(y&y-1)>0}||[-1])*' ' __END__ h={};[*0..64].map{|i|h[1<0 puts [i,n-i]*' ' exit end } p -1