require 'prime' v=gets.to_i # 存在するか? EXISTS=(1..Math.sqrt(v).floor).select{|n| v % n == 0}.map{|n| [n, v/ n]}.flatten.reject{|n| n == 1 || n == v || Prime.prime?(n)}.any? puts EXISTS ? "YES" : "NO"