'use strict';
let stdin = require('fs').readFileSync('/dev/stdin', 'utf8');
let a = 0, b = 0;
for(let x of stdin.split(' ')) {
	x = parseInt(x);
	if(x == 5) {
		a++;
	} else if(x == 7) {
		b++;
	}
}
console.log(a == 2 && b == 1 ? "YES" : "NO");