#include<cstdio>

int date[3];

int main()
{
	while(true){
	for(int i=0;i<3;i++)
	{
		if(scanf("%d",&date[i])==EOF)goto end;
	}
	int sum=date[0]+date[1];
	double ave=(55-sum-date[2])/7;
	if((20-sum)>=ave)printf("YES\n");
	else printf("NO\n");
	}

end:
	return 0;
}