N=gets.to_i a=[3,5].find{|a|N-a&N-a-1>0} puts a ?"#{a} #{N-a}":-1