import java.util.*
 
fun main(args:Array<String>){
  val list = readLine()!!.split(" ").map(String::toInt)
  var five = 0
  var seven = 0
  for(i in 0..list.size - 1){
    when{
      list[i] == 5 -> five++
      list[i] == 7 -> seven++
    }
  }
  if((five == 2) &&(seven == 1)){
    println("YES")
  }
  else{
    println("NO")
  }
}
