import java.util.Scanner

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

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