function Main(input) {
  input = input.split(" ");
  let count5 = 0;
  let count7 = 0;
  for(const a of input){
    if(a === '5'){
      count5++;
    }
    if(a === '7'){
      count7++;
    }
  }
  if(count5 === 2 && count7 === 1){
    console.log('YES');
  } else {
    console.log('NO');
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));