import java.util.Scanner

object Main {
  def main(args: Array[String]): Unit = {
    val sc = new Scanner(System.in)
    val X = Integer.parseInt(sc.next)

    println(if (X == 3 || X == 5 || X == 7) "YES" else "NO")
  }
}