object Main extends App {
    val x:Int = scala.io.StdIn.readLine().toInt
    val shichigosan = List(3,5,7)

    if (shichigosan.contains(x)) {
      println("YES")
    } else {
      println("NO")
    }
}