'use strict'
function Main(input) {
  const arr = input.split(" ");
  
  let count5 = 0;
  let count7 = 0;
  
  arr.array.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"));
