# frozen_string_literal: true def solve require 'prime' h = Prime.prime_division(N).to_h h.size >= 3 || h.values.find { _1 >= 3 } ? 'YES' : 'NO' end N = gets.to_i puts solve