require 'prime' class Calc0036 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @n = args.shift.first.to_i @prime = Prime.instance end def calc return false if @n == 1 divs = @prime.prime_division(@n).map(&:last) divs.inject(:+) >= 3 end def run calc ? 'YES' : 'NO' end end puts Calc0036.new(STDIN.readlines).run if __FILE__ == $0