import std.stdio, std.conv, std.string, std.array, std.algorithm, std.math, std.regex;

void main(){
	auto ip = readln.split.to!(int[]);
	writeln(ip.count(5) == 2 && ip.count(7) == 1 ? "YES" : "NO");
}