object Main {
  def main(args:Array[String]) = {
    val in = readLine.split(" ").map(_.toInt) 
	if (in(0) == 7 || in(0) == 5 || in(0) == 3){
      println("YES")
    }
    else{
    	println("NO")
    }
  }
}