function Main(input) {
  input = input.split("\n");
  const args = input[0].split(" ");

  let sum = 0;
  args.forEach(a => {
    sum = sum + Number(a);
  });
  sum == 17 ? console.log("YES") : console.log("NO");
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
