import scala.io.StdIn

object Main {

  def main(args: Array[String]): Unit = {
    val x = StdIn.readLine().toInt
    if (x == 7 || x == 5 || x == 3) {
      println("YES")
    } else {
      println("NO")
    }
  }

}
