fun main(args: Array<String>){
    val input = readLine()!!.split(' ')
                            .map  { it.toInt() }
    val fiveCount = input.count{it == 5}
    if (fiveCount != 2) return noGood()

    val sum = input.sum()
    if (sum != 17) return noGood()

    println("YES")
}
fun noGood(){
    println("NO")
}