import scala.io.StdIn import scala.collection.mutable.ArrayBuffer object Main { def main(args: Array[String]): Unit = { var n = StdIn.readLong val memo = ArrayBuffer[Int]() for (i <- (2 to Math.sqrt(n).toInt + 1)) { while (n % i == 0) { memo += i n /= i } } println( if (memo.size > 2) "YES" else "NO" ) } }