object Main extends App {
  val x = io.StdIn.readLine()
  val targets = Seq('7', '5', '3')
  val res = x.toCharArray.foldLeft(0)((acc, a) => if (targets.contains(a)) 1 + acc else acc)
  println(if (res > 0) "YES" else "NO")
}