fun main(args: Array<String>) {
    val  inLyric = readLine()?.split(" ").orEmpty()
    var inList = mutableListOf<Int>()
    var collectList = mutableListOf(5, 7, 5)

    inLyric.forEach{
        inList.add(it.toInt())
    }
    inList.sort()
    collectList.sort()

    if(inList == collectList){
        println("YES")
    }else{
        println("NO")
    }

}