object Main extends App {
  val sc = new java.util.Scanner(System.in)
//  val l = List.fill(5)(sc.nextInt)
  val x = sc.nextInt
 
  val ans = if (x == 7 || x == 5 || x == 3) "YES" else "NO"
 
  println(ans)
}