function main(input) {
  const args = input.split(' ').map(n => parseInt(n, 10));
  let go = 0;
  let nana = 0;
  
  for (let i = 0; i < args.length; i++) {
    if (args[i] === 5) { go++; };
    if (args[i] === 7) { nana++; };
  }
  
  if (go === 2 && nana === 1) {
    console.log('YES');
  } else {
    console.log('NO');
  }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));