
import java.util.Scanner

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

  val x = sc.nextInt

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