function main(input){
const args = input.split(" ");
if(args.indexOf("5")!==-1&&args.indexOf("7")!==-1&&args.indexOf("5")!==args.lastIndexOf("5")){
console.log("YES");}else{console.log("NO")}
}
main(require("fs").readFileSync('/dev/stdin','utf8'))