import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;

void main()
{
	int[] t = map!(to!int)(split(readln())).array;
	int[] checker = [0,0];
	
	for(int i=0;i < 3;i ++)
	{
		if(t[i] == 5)
		{
			checker[0] ++;
		}
		else
		{
			checker[1] ++;
		}
	}
	if(checker[0] == 2 && checker[1] == 1)
	{
		writeln("YES");
	}
	else
	{
		writeln("NO");
	}
}