Main(num) {
  num = num.split(" ")
  var five = 0;
  var seven = 0;
  for(var i = 0; i < num.length; i++){
    if(num[i] == 5){
      five++;
    }else if(num[i] == 7){
      seven++;
    }
  }
  if(five == 2 && seven == 1){
    console.log("YES");
  }else {
    console.log("NO");
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
