function main(lines) {
  const phrases = na();
  
  let cnt5 = cnt7 = 0;
  phrases.forEach(n => {
    if (n == 5) cnt5++;
    if (n == 7) cnt7++;
  })
  const ans = cnt5 == 2 && cnt7 == 1 ? 'YES' : 'NO';
  
  return ans;
}



const lines = require("fs").readFileSync("/dev/stdin", "utf8").trim().split("\n");

let lineCount = 0;
const s = () => lines[lineCount++];
const n = () => Number(s());
const b = () => BigInt(s());
const sa = () => s().split(' ');
const na = () => sa().map(Number);
const ba = () => sa().map(BigInt);

const ans = main(lines);
console.log( ans );