object Main extends App {
  import scala.annotation.tailrec

  def ans(s: String): String = {
    val xs = cards(s)
    val n = xs.head + xs(1)
    val p = others(xs).map(_ + n).count(_ <= 20) / 7.0

    if (p < 0.5) "NO"
    else "YES"
  }
  def others(xs: Seq[Int]): Seq[Int] = 1.to(10).filterNot(xs.contains)
  def cards(s: String): Seq[Int] = s.split(' ').map(_.toInt)

  @tailrec
  def loop() {
    val line = scala.io.StdIn.readLine()
    if (line == null) return
    else {
      println(ans(line))
      loop()
    }
  }

  loop()
}