
object Main extends App {

  import scala.io.StdIn._


  val n = readLine.trim.toInt
  println(
    if (n == 3 || n == 5 || n == 7) "YES" else "NO"
  )
  implicit class Extenion[T](val value :T){
    def also(func: T ⇒ Unit): T = {
      func(value)
      value
    }
    def let[R](func: T ⇒ R): R = func(value)
  }
}