import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)

  def taskA() {
    val ans = sc.nextInt() match {
      case 7 | 5 | 3 => "YES"
      case _ => "NO"
    }
    println(ans)
  }

  taskA()
}
