"use strict"
function main(arg) {
    if (arg.trim().split("\n")[0].split(" ").map(Number).sort((a,b) => a-b).join('') == '557') {
        console.log('YES')
    } else {
        console.log('NO')
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));