function Main(input) {
  var patternOne = "5 7 5";
  var patternTwo = "5 5 7";
  var patternThree = "7 5 5";
  if (input.equals(patternOne) || input.equals(patternOne) || input.equals(patternOne)) {
    console.log("YES");
  } else {
    console.log("NO")
  }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));