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