/**
  * Created by kohei on 16/08/05.
  */
object A extends App {
  import scala._
  val l = io.StdIn.readLine()
  val nums = l.split(" ").map((s) => s.toInt)
  if (nums.count((i) => i == 5) == 2 && nums.count((i) => i == 7) == 1 ) {
    println("YES")
  } else {
    println("NO")
  }
}