function Main(input) {
    input = input.split("\n");
	if(input[0] === 5 && input[1] === 7 && input[2] === 5 ){
      console.log('YES');
    } else {
      console.log('NO');
    }
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));