import math._ import scala.collection.mutable.ArrayBuffer object Main { def sieve(n: Int): Array[Int] = { val tab = new Array[Boolean](n+1) val primes = new ArrayBuffer[Int] primes.append(2) for (i <- 3 to n by 2) { if (!tab(i)) { // i is prime primes.append(i) for (j <- i to n by i) { tab(j) = true } } } primes.toArray } def main(args: Array[String]) { val sc = new java.util.Scanner(System.in) var n = sc.nextLong val primes = sieve(10000000) var x = 0 // 割り切る素因数の個数 for (p <- primes) { while (n % p == 0) { n /= p x += 1 } } if (n > 1) x += 1 println(if (x >= 3) "YES" else "NO") } }