'use strict';

function main(input) {
  const inputs = input.split(' ').map((x) => x | 0);

  const sum = inputs.reduce((a, b) => a + b);
  if (sum != 17) {
    console.log('NO');
    return;
  }

  let i = inputs.shift();
  while (i) {
    if (i != 5 && i != 7) {
      console.log('NO');
      return;
    }
    i = inputs.shift();
  }

  console.log('YES');
}

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