#include <stdio.h>

int main(void)
{
	char buf;
	int buf_cnt = 0;
	int c[3];
	int my_cards;
	int ok = 0;
	int cnt = 0;
	double probability;
	for (int i = 0; i < 3; i++)
	{
		c[i] = 0;
	}
	
	while ((buf = getchar()) != EOF)
	{
		if (buf >= '0' && buf <= '9')
		{
			buf -= '0';
			c[buf_cnt] = c[buf_cnt] * 10 + buf;
			continue;
		}
		else if (buf != '\n')
		{
			if (c[buf_cnt] != 0)
			{
				buf_cnt++;
				continue;
			}
			else if (buf_cnt < 3)
			{
				continue;
			}
		}
		else
		{
			if (c[2] == 0)
			{
				for (int i = 0; i < 3; i++)
				{
					c[i] = 0;
				}
				continue;
			}
		}

		my_cards = c[0] + c[1];

		for (int i = 1; i <= 10; i++)
		{
			//c[0],2,c3??¨?¢??????´???????????????
			if (i == c[0] || i == c[1] || i == c[2])
			{
				continue;
			}

			if (my_cards + i <= 20)
			{
				ok++;
			}
			cnt++;
		}
		probability = (double)ok / (double)cnt;

		if (probability >= 0.5)
		{
			printf("YES\n");
		}
		else
		{
			printf("NO\n");
		}
		for (int i = 0; i < 3; i++)
		{
			c[i] = 0;
		}
		ok = 0;
		cnt = 0;
		buf_cnt = 0;
		rewind(stdin);
	}

	return 0;
}