fun main (args: Array<String>) {
    val input = requireNotNull(readLine())
    val phraseSizes = input.split(" ")

    if (phraseSizes.size != 3) {
        println("NO")
        return
    }

    val phrasesWithSize5 = phraseSizes.filter { it == "5" }.size
    val phrasesWithSize7 = phraseSizes.filter { it == "7" }.size

    if (phrasesWithSize5 == 2 && phrasesWithSize7 == 1) {
        println("YES")
    } else {
        println("NO")
    }
}