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