#include <stdio.h>

int main(void)
{
	int a, b, na[1000], nb[1000], i = 0, j = 0, x, y, num, count = 0;
	
	scanf("%d%d", &a, &b);
    
    while (a > 0)
	{
		na[i] = a % 10;
		a /= 10;
		i++;
	}
	
	while (b > 0)
	{
		nb[j] = b % 10;
		b /= 10;
		j++;
	}
	
	for (x = i - 1, y = j - 1; x >= 0 || y >= 0; x--, y--)
	{
		num = na[x] + nb[y];
		if (num > 9)
		{
			count++;
		}		
	}
	
	if (count > 0)
	{
		printf("Yes");
	}
	else
	{
		printf("No");
	}	
	
	return 0;
}