process.stdin.resume();
process.stdin.setEncoding('utf8');
 
var input_lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
 
let count5 = 0; 
  let count7 = 0; 
  let result = 'NO'
reader.on('line', (line) => {
  input_lines = line.split(" ")
  
  for(let i = 0; i < input_lines.length; i++) {
  
    if(input_lines[i] == 5) {
      count5++
    }
    if(input_lines[i] == 7) {
      count7++
    }

   }
  
  if(count7 == 1 && count5 == 2) {
    result = 'YES'
  }
  
});
 
 
/* ーーーー入力ーーーー
ここに書くコードを変える
 
 
　 ーーーー出力ーーーー */
reader.on('close', () => {
  console.log(result);
});