function main() {
  process.stdin.resume();
  process.stdin.setEncoding("utf8");
  var chunks = "";

  process.stdin.on("data", function (chunk) {
    chunks += chunk;
  });

  process.stdin.on("end", function () {
    var inputs = chunks.trim().split("\n");
    var nums = inputs[0].split(" ");
    var go = 0;
    var shichi = 0;

    nums.forEach((n) => {
      if (n === "5") {
        go += 1;
      } else if (n === "7") {
        shichi += 1;
      }
    });

    go === 2 && shichi === 1 ? console.log("YES") : console.log("NO");
  });
}

main();
