'use strict';
function Main(input) {

  let ary = input.split(" ");
  ary.sort();
  (ary.toString="557") ? console.log("YES") : console.log("NO")

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