#include<bits/stdc++.h>
using namespace std;
int main()
{
    int a,b;
    cin>>a>>b;
    string a1, b1, c1;
    int c=a+b;
    a1 =to_string(a);
    b1 = to_string(b);
    c1 = to_string(c);
    for(int i=a1.size()-1;i>=0;--i)
    {
        if(a1[i]=='0')
            a1.erase(a1.begin()+i);
    }
    for(int i=b1.size()-1;i>=0;i--)
    {
        if(b1[i]=='0')
            b1.erase(b1.begin()+i);
    }
    for(int i=c1.size()-1;i>=0;i--)
    {
        if(c1[i]=='0')
            c1.erase(c1.begin()+i);
    }
    a=stoi(a1);
    b=stoi(b1);
    c=stoi(c1);
    if((a+b)==c)
        cout<<"YES";
    else
        cout<<"NO";

}

#define _CRT_SECURE_NO_WARNINGS
// solved by Ralor. Yes, it is)

#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <algorithm>
#include <map>
#include <cmath>
#include <queue>
#include <deque>
#include <stack>
#include <set>
#include <list>
#include <time.h>
#pragma region def/tech

#pragma comment (linker, "/STACK:256000000")
#define TASK "ladder"
#define FOR(i, f, n) for (int i = (f); (i) < (int)(n); i++)
#define FORN(i, f, n) for (int i = (f); (i) <= (int)(n); i++)
#define int64 long long
#define INF 18446744073709551615
#define inf 2147483647
#define eps 10e-8

using namespace std;
string Solve();
int main()
{
#ifdef _DEBUG
    clock_t startTime = clock();
    freopen("input.txt","r",stdin);
    freopen("output.txt","w",stdout);
#endif
	//freopen(TASK".in","r",stdin);
	//freopen(TASK".out","w",stdout);
    string s = Solve();

#ifdef _DEBUG
	printf("___ STOP ___");
	printf("\n\n\n|------------------\n|-- return \"%s\" \n|-- %d msec \n|------------------\n",s.c_str(),(int)((clock() - startTime)/(double)CLOCKS_PER_SEC*1000));
#endif
    return 0;
}

#pragma endregion
#pragma region IOUtils

int nextint()
{
    int x;
    scanf("%d",&x);
    return x;
}
string nextline()
{
	string s;
	getline(cin,s);
	return s;
}
string nextword()
{
    string s;
	cin >> s;
	return s;
}
double nextdouble()
{
    double x;
    cin >> x;
    return x;
}
char nextchar()
{
	char c;
	scanf("%c",&c);
	return c;
}

#pragma endregion

#pragma region func

void delz(int * a)
{
	int dig = 0, ch = *a, res = 0;
	int p = 1;
	while (ch > 0)
	{
		dig = ch % 10;
		ch /= 10;
		res += dig * p;
		if (dig != 0) p *= 10;
	}
	*a = res;
}

#pragma endregion
string Solve()
{
	//cout << NextInt();

	int a = nextint(), b = nextint(), c = a + b;

	delz(&a); delz(&b); delz(&c);

	if (a + b == c) cout << "YES"; else cout << "NO";

	return "end";
}

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

void printArray(vector<int> arr) {
	for (int a: arr) cout << a << " ";
	cout << '\n';
}

vector<int> getDigits(int val) {
	vector<int> ret;
	while (val > 0) {
		ret.insert(ret.begin(), val%10);
		val /= 10;
	}
	return ret;
}

bool evaluate(vector<int> digits_a, vector<int> digits_b) {\
	if (digits_a.back() + digits_b.back() == 10) return false;
	if (!digits_a.back() && digits_b.back()) return false;
	if (digits_a.back() && !digits_b.back()) return false;
	int i = (int) digits_a.size()-2;
	int j = (int) digits_b.size()-2;

	int remainder = (digits_a.back() + digits_b.back())/10;

	while (i>=0 && j >= 0) {
		if (!digits_a[i] && !digits_b[i] && remainder > 0) return false;
		else if ((digits_a[i] + digits_b[i] + remainder)%10==0 && (digits_a[i] + digits_b[i] + remainder) >= 10) return false;
		else if ((!digits_a[i] || !digits_b[j]) && digits_a[i] != digits_b[j]) return false;
		remainder = (digits_a[i] + digits_b[i] + remainder)/10;
		i--;
		j--;
	}

	return true;
}

int main() {
	std::ios_base::sync_with_stdio(false);
	int a, b;
	cin >> a >> b;
	vector<int> digits_a = getDigits(a);
	vector<int> digits_b = getDigits(b);
	cout << (evaluate(digits_a, digits_b) ? "YES" : "NO") << '\n';
}

/*
 * 3027 + 1075 = 4102
 * 312 + 488 = 800
 * 3500 + 200 = 3
 * */

#include<stdio.h>
long long a,b,c,a1,b1,c1;
long long remove(long long k)
{
    int v[100];
    int x;
    for(int i=0;i<=15;++i)
        v[i]=0;
    while(k!=0)
    {
        x=k%10;
        if(x)
        {
            v[++v[0]]=x;
        }
        k=k/10;
    }
    long long rez=0;
    for(int i=v[0];i>=1;--i)
    {
        rez=rez*10;
        rez=rez+v[i];
    }

    return rez;
}
using namespace std;
int main()
{
    scanf("%d%d",&a,&b);
    c=a+b;
    a1=remove(a);
    b1=remove(b);
    c1=remove(c);
    if(c1==a1+b1)
       printf("YES\n");
    else printf("NO\n");
    return 0;
}

#include<bits/stdc++.h>
using namespace std ;
#define ll long long

ll removeZero(ll n)
{
	string ss = to_string(n);
	string tmp = "";
	for(int i=0;i<ss.size();i++)
		if(ss[i]!='0')
			tmp+=ss[i];

	return stoll(tmp);
}

int main()
{
    ios_base::sync_with_stdio(0);
	cin.tie(0);
	ll a,b;
	cin>>a>>b;
	ll sum = a+b;
	a = removeZero(a);
	b = removeZero(b);
	sum = removeZero(sum);

	if(a+b==sum)
		cout<<"YES"<<endl;
	else
		cout<<"NO"<<endl;
	return 0;
}

/*/**/

#include <bits/stdc++.h>

using namespace std;

long long func(long long n) {
	long long ret = 0;
	long long ten = 1;
	while(n) {
		if(n % 10) {
			ret += ten * (n % 10);
			ten *= 10;
		}
		n /= 10;
	}
	return ret;
}

int main() {
	long long a, b;
	cin >> a >> b;
	if(func(a) + func(b) == func(a + b)) {
		cout << "YES\n";
	}
	else {
		cout << "NO\n";
	}
	return 0;
}

#include <iostream>

using namespace std;

int removeZeros(int a){
    int temp = 0;
    int luyThua = 1;
    while (a>0){
        int x = a%10;
        temp += x*luyThua;
        if(x!=0)
            luyThua*=10;
        a/= 10;
    }
    return temp;
}

int main()
{
    int a, b, c;
    cin >> a >> b;
    if(removeZeros(a)+removeZeros(b) == removeZeros(a+b))
        cout << "YES";
    else
        cout << "NO";
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    unsigned long long m,n,re(0),dm,dn,check(0);
    cin >> m >> n;
    if(m>n) swap(m,n);
    while(m!=0)
    {
        dm=m%10;
        dn=n%10;
        if(dm+dn+re==10) {check++;break;}
        if(dm==0||dn==0)
        {
            if(dm+dn+re > 0) {check++;break;}
        }
        if(dm+dn+re > 9) re=1;
        else re=0;
        m/=10;
        n/=10;
    }
    while(n!=0)
    {
        dm=m%10;
        dn=n%10;
        if(dm+dn+re==10) {check++;break;}
        if(dn==0)
        {
            if(dm+dn+re > 0) {check++;break;}
        }
        if(dm+dn+re > 9) re=1;
        else re=0;
        m/=10;
        n/=10;
    }
    if(check>0) cout <<"NO";
    else cout <<"YES";
}

#include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
long long shrink(long long x)
{
    char s[12];
    char sans[12]="\0";
    long long ans;
    int i=0,j=0;
    sprintf(s,"%I64d",x);
    for(i=0;i<strlen(s);i++)
    if(s[i]!='0'){sans[j]=s[i];j++;}
    sscanf(sans,"%I64d",&ans);
    return ans;
}
int main()
{
    long long a,b,c;
    cin>>a>>b;
    c=a+b;
    if(shrink(a)+shrink(b)==shrink(c))
    puts("YES");
    else puts("NO");
    return 0;
}

#include <iostream>
using namespace std;

long long dezero(long long num)
{
	long long result = 0;
	short arr[10] = { 0 }, i = 0;
	while (num)
	{
		if (num % 10)
		{
			arr[i++] = num % 10;
		}
		num /= 10;
	}
	for (int i = 9; i >= 0; i--)
	{
		result *= 10;
		result += arr[i];
	}
	return result;
}

int main()
{
	long long a, b, resultB;
	cin >> a >> b;
	resultB = dezero(a + b);
	if (resultB == (dezero(a) + dezero(b)) )
	{
		cout << "YES" << endl;
		return 0;
	}
	cout << "NO" << endl;
}

#include <iostream>

using namespace std;

int remove0(int n)
{
    int m(0), pow(1);
    while (n != 0)
    {
        int d = n % 10;
        n /= 10;
        if (d != 0)
        {
            m += d * pow;
            pow *= 10;
        }
    }
    return m;
}

int main()
{
    int a, b;
    cin >> a >> b;
    int c = a + b;
    int A = remove0(a);
    int B = remove0(b);
    int C = remove0(c);
    cout << (A + B == C ? "YES" : "NO") << endl;
    return 0;
}

#include <iostream>
#include<string>
using namespace std;

int sum(int x)
 { int x_2=0 , t=1 ;
   while(x)
     if(x%10)
      {
         x_2+=(x%10)*t ;
         t*=10 ;
         x/=10 ;
      }
      else
        x/=10 ;
    return x_2 ;
 }

int main()
{ int a , b ,c  ;
cin>>a>>b ;

c=a+b ;

if(sum(a)+sum(b)==sum(c))
    cout<<"YES" ;

    else
    cout<<"NO" ;
        return 0;
}

#include<iostream>
#include<vector>
#include<math.h>

using namespace std;

int main()
{
	vector<int> a;
	int n1,n2,sum,number1=0,flag=0,j;
	double i;
	cin >> n1;
	cin >> n2;
	sum=n1+n2;

	while(sum!=0)
	{
		if(sum%10!=0)
		a.push_back(sum%10);

		sum/=10;
	}

	for(i=0;i<a.size();i++)
	{
		if(i==0)
		number1+=a[i];

		else
		{
		for(j=0;j<i;j++)
			a[i]*=10;

		number1+=a[i];
		}
	}

		a.clear();
		while(n1!=0)
	{
		if(n1%10!=0)
		a.push_back(n1%10);

		n1/=10;
	}
	for(i=0;i<a.size();i++)
	{
		if(i==0)
		n1+=a[i];

		else
		{
		for(j=0;j<i;j++)
			a[i]*=10;

		n1+=a[i];
		}
	}

		a.clear();

		while(n2!=0)
	{
		if(n2%10!=0)
		a.push_back(n2%10);

		n2/=10;
	}
	for(i=0;i<a.size();i++)
	{
		if(i==0)
		n2+=a[i];

		else
		{
		for(j=0;j<i;j++)
			a[i]*=10;

		n2+=a[i];
		}
	}

		int number2=n1+n2;
		if(number1==number2)
		cout << "YES";

		else
		cout << "NO";

		return 0;
}

#include <bits/stdc++.h>
using namespace std;

int main() {
	long long int a, b, c;
	cin >> a >> b;
	c = a+b;
	long long int newa, newb, newc;
	newa = newb = newc = 0;
	long long int counter = 1;
	long long int x;
	while(a){
		x = a%10;
		a/= 10;
		if(x){
			newa += x*counter;
			counter*=10;
		}
	}
	counter = 1;
	while(b){
		x = b%10;
		b/= 10;
		if(x){
			newb += x*counter;
			counter*= 10;
		}
	}
	counter = 1;
	while(c){
		x = c%10;
		c/= 10;
		if(x){
			newc += x*counter;
			counter*=10;
		}
	}
	if(newa + newb == newc){
		cout << "YES";
	}
	else{
		cout << "NO";
	}
	return 0;
}

#define _USE_MATH_DEFINES

#include <cstdio>
#include <iostream>
#include <fstream>
#include <sstream>
#include <climits>
#include <ctime>
#include <cassert>
#include <cstdlib>
#include <algorithm>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <bitset>

using namespace std;

#ifndef __GNUC__
    typedef unsigned long int uint;
#endif

typedef signed short int int16;
typedef unsigned short int uint16;
typedef signed long long int int64;
typedef unsigned long long int uint64;
typedef long double real;

typedef pair<int, int> pii;
typedef pair<int64, int64> pii64;

const int INF = INT_MAX;
const int64 LINF = LLONG_MAX;
const real EPS = 1e-9;
const int MOD = 1000000007; // 10**9 + 7
const int MAXN = 100001;
const int ALPH = 26; // Latin alphabet size
const int DALPH = 52; // Double Latin alphabet size

#define mp(a, b) make_pair((a), (b))
#define all(a) (a).begin(), (a).end()
#define szof(a) (int)(a).size()

#define pub(a) push_back(a)
#define pob() pop_back()
#define puf(a) push_front(a)
#define pof() pop_front()

int a, b;

int remove_zero(int num) {
  int res = 0;
  int pow = 1;

  while (num) {
    if (num % 10 == 0) {
      num /= 10;
      continue;
    }

    res += (num % 10) * pow;
    pow *= 10;
    num /= 10;
  }

  return res;
}

int main() {
  scanf("%d %d", &a, &b);
  if (remove_zero(a) + remove_zero(b) == remove_zero(a + b)) {
    puts("YES");
  } else {
    puts("NO");
  }
}

#include <bits\stdc++.h>
#define N 100007
#define inf 1000000007
#define pb push_back
#define ff first
#define ss second
#define pii pair<int,int>

using namespace std;

int a,b,c,k = 1,e,f,g;

int main()
{
	cin >> a >> b;
	c = a + b;
	while(a){
		if(a % 10){
			e += (a % 10) * k;
			k *= 10;
		}
		a /= 10;
	}
	k = 1;
	while(b){
		if(b % 10){
			f += (b % 10) * k;
			k *= 10;
		}
		b /= 10;
	}
	k = 1;
	while(c){
		if(c % 10){
			g += (c % 10) * k;
			k *= 10;
		}
		c /= 10;
	}
	if(g == (e+f))
		cout << "YES";
	else cout << "NO";
}

#include <functional>
#include <utility>
#include <numeric>
#include <set>
#include <map>
#include <list>
#include <iomanip>
#include <cmath>
#include <string>
#include <vector>
#include <queue>
#include <stack>
#include <complex>
#include <sstream>
#include <iostream>
#include <algorithm>
#include <valarray>

using namespace std;

#define TOSTRING(X) (static_cast<ostringstream*>( &(ostringstream() << (X)) )->str())

int main()
{
    string x;
    string y;

    while(cin >> x >> y)
    {
        int sumxx = 0;
        int sumyy = 0;
        int sumx = 0;
        int sumy = 0;

        for(int i=0;i<(int)x.length();i++)
        {
            sumx*=10;
            sumx+=(x[i]-'0');
            if(x[i]!='0')
            {
                sumxx*=10;
                sumxx+=(x[i]-'0');
            }
        }
        for(int i=0;i<(int)y.length();i++)
        {
            sumy*=10;
            sumy+=(y[i]-'0');
            if(y[i]!='0')
            {
                sumyy*=10;
                sumyy+=(y[i]-'0');
            }
        }
        string wzeros = TOSTRING(sumx+sumy);
        int nozeros = 0;
        for(int i=0;i<(int)wzeros.length();i++)
        {
            if(wzeros[i] !='0')
            {
                nozeros*=10;
                nozeros+=(wzeros[i]-'0');
            }
        }
        if(nozeros == (sumxx+sumyy))cout << "YES" <<endl;
        else cout << "NO" <<endl;
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int ql(int x)
{
	int z=0,y=1;
	while(x){
		if(x%10!=0)
		{
			z+=x%10*y;
			y*=10;
		}
		x/=10;
	}
	return z;
}
int main()
{
	int a,b,c,d,e;cin>>a>>b;c=a+b;
	if (ql(a)+ql(b)==ql(c))cout<<"YES";
	else cout<<"NO";
	return 0;
}

#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;

    auto strip = [](int k)->int{
        int n = 0, p = 1;
        while (k > 0) {
            int kk = k % 10;
            if (kk > 0) {
                n = kk * p + n;
                p *= 10;
            }
            k /= 10;
        }
        return n;
    };

    cout << (strip(a + b) == strip(a) + strip(b) ? "YES" : "NO") << endl;

    return 0;
}

#include<iostream>
#include<cstring>
using namespace std;

char a[23];
char b[23];
int main()
{

while(cin>>a>>b)
{
int ha=strlen(a);
int hb=strlen(b);

    long aa=0;
    long aaa=0;
    for(int i=0;i<ha;i++)
    {
        if(a[i]!='0')aa=aa*10+(a[i]-'0');
        aaa=aaa*10+(a[i]-'0');
    }
    long bb=0;
    long bbb=0;
    for(int i=0;i<hb;i++)
    {
        if(b[i]!='0')bb=bb*10+(b[i]-'0');
        bbb=bbb*10+(b[i]-'0');
    }
    long ccc=aaa+bbb;
    long cc=0;
    long long dd=1;
    long long ddd=ccc;
    while(ddd>0)
    {
        if(ddd%10!=0)
        {
        cc=cc+dd*(ddd%10);
        dd*=10;
        }
    ddd/=10;
    }
   // cout<<aa<<" "<<aaa<<endl;
    // cout<<bb<<" "<<bbb<<endl;
    // cout<<cc<<" "<<ccc<<endl;
if(aa+bb==cc)cout<<"YES"<<endl;
else cout<<"NO"<<endl;
}
return 0;
}
/****** PCCA -Thu Aug 04 16:34:27 GMT 2011 *******/

#include <iostream>
#include <string>
#include <cstdio>
#include <cstdlib>
using namespace std;
int h(int n)
{
char s[50];
sprintf(s,"%d",n);
string ss=s;
for(int i=0;i<ss.size();i++)if(ss[i]=='0'){ss.erase(i,1);i--;}
return atoi(ss.c_str());
}

int main()
{
int a,b,c;
cin>>a>>b;
c=a+b;
int ah=h(a),bh=h(b),ch=h(c);
cout<<(ah+bh==ch?"YES":"NO")<<'\n';
return 0;
}

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
	ll a, b ,c ;
	char K[11], L[11], M[11];
	cin>>a>>b;
	c=a+b;
string A,B,C;
	A=to_string(a);
	B=to_string(b);
	C=to_string(c);

int	s=0;
	for (int i=0;i<A.size();i++)
	{if (A[i]=='0') {A.erase(A.begin()+i);}
	else {K[s]=A[i]; s++;} }

	s=0;
	for (int i=0;i<B.size();i++)
	if (B[i]=='0') {B.erase(B.begin()+i);}
	else {L[s]=B[i]; s++;}

	s=0;
	for (int i=0;i<C.size();i++)
	if (C[i]=='0') {C.erase(C.begin()+i);}
	else {M[s]=C[i]; s++;}

	ll x=atoll(K);
	ll y=atoll(L);
	ll z=atoll(M);
	if (x+y==z) {cout<<"YES";}
	else cout<<"NO";

}

#include <cstdio>
#include <cstring>
#include <iostream>
#include <algorithm>
using namespace std;

int a, b, s1, s2;

int remove(int x){
    int dig = 0, ret = 0, t[12];

    while (x)
        t[dig ++] = x % 10, x /= 10;

    for (int i = dig - 1; i >= 0; i --)
        if (t[i])
            ret = ret * 10 + t[i];

    return ret;
}

int main(){
    cin >> a >> b;

    s1 = a + b;
    s1 = remove(s1);
    s2 = remove(a) + remove(b);

    if (s1 == s2)
        cout << "YES";
    else
        cout << "NO";
}

#include <iostream>
#include <vector>

using namespace std;

#define ll long long
#define pb push_back
#define lp(i,n) for(int i=0;i<n;++i)
#define sz(v) (int)(v.size())

vector<ll> A,B,C;

ll nA=0,nB=0,nC=0;

ll power(ll b, ll p)
{
    if(p==0)
        return 1;

    ll powr = power(b,p/2);

    if(p%2==0)
        return powr*powr;
    else
        return b*powr*powr;
}

ll clearA(ll n)
{
    while(n!=0)
    {
        if(n%10!=0){
            A.pb(n%10);
        }
        n/=10;
    }

    lp(i,sz(A))
    {
        nA+=A[i]*power(10,i);
    }

    return nA;
}

ll clearB(ll n)
{
    while(n!=0)
    {
        if(n%10!=0){
            B.pb(n%10);
        }
        n/=10;
    }

    lp(i,sz(B))
    {
        nB+=B[i]*power(10,(ll)i);
    }

    return nB;
}

ll clearC(ll n)
{
    while(n!=0)
    {
        if(n%10!=0){
            C.pb(n%10);
        }
        n/=10;
    }
    int s = sz(C);

    lp(i,s)
    {
        nC+=C[i]*power(10,ll(i));
    }

    return nC;
}

int main()
{
    ll a,b,c;
    cin >> a >> b;
    c=a+b;
    if(clearA(a)+clearB(b)==clearC(c))
        cout << "YES" << endl;
    else
        cout << "NO" << endl;

    return 0;
}

#include<bits/stdc++.h>

using namespace std;

int f(int x)
{
    int res = 0, p = 1;
    while(x)
    {
        int t = x % 10;
        x /= 10;
        if(t)
            res += t * p, p *= 10;
    }
    return res;
}

int main()
{
    int a , b;
    cin>>a>>b;
    if(f(a) + f(b) == f(a+b))
        cout<<"YES";
    else
        cout<<"NO";

}

#include<iostream>
#include<vector>
#include<string>
#include<stack>
#include<algorithm>
#include<cmath>
#include<set>
#include<queue>
#include<sstream>
#include<utility>

using std::pair;
using std::stringstream;
using std::next_permutation;
using std::sqrt;
using std::priority_queue;
using std::sort;
using std::stack;
using std::string;
using std::vector;
using std::cin;
using std::cout;
using std::endl;
using std::min;
using std::max;
using std::set;
using std::swap;
using std::random_shuffle;
using std::queue;
using std::sin;
using std::cos;
using std::make_pair;
using std::cos;
using std::cerr;

typedef long long ll;
typedef pair<ll, ll> pll;
typedef pair<int, int> pii;
const long double PI = 3.14159265358979323846;

int f(int x) {
	int res = 0;
	ll u = 1;
	while (x > 0) {
		if (x % 10) {
			res = res + u * (x % 10);
			u *= 10;
		}
		x /= 10;
	}
	return res;
}

int main() {
	int a, b, c, a1, b1, c1;
	cin >> a >> b;
	c = a + b;
	a1 = f(a);
	b1 = f(b);
	c1 = f(c);
	if (a1 + b1 == c1)
		cout << "YES" << endl;
	else
		cout << "NO" << endl;
	return 0;
}

#include "iostream"
#include "string"
using namespace std;
string con(int a)
{
	string m;
	for(int i=a;i>0;i/=10)
	{
		m+=i%10;
	}
	return m;
}
int recon(string a)
{
	int b=0;
	for(int i=0,j=1;i<a.size();j*=10,i++)
	{
		b+=(a[i]*j);
	}
	return b;
}

void main()
{
	int a,b;
	cin>>a>>b;
	int c=a+b;
	string aa=con(a);
	string bb=con(b);
	string cc=con(c);
	for(int i=0;i<aa.length();i++)
	{
		if(int(aa[i])==0){
			aa.erase(i,1);
			i--;
		}
	}
	for(int i=0;i<bb.length();i++)
	{
		if(int(bb[i])==0){
			bb.erase(i,1);
			i--;
		}
	}
	for(int i=0;i<cc.length();i++)
	{
		if(int(cc[i])==0){
			cc.erase(i,1);
			i--;
		}
	}
	if(recon(cc)==(recon(aa)+recon(bb)))
	{
		cout<<"YES";
	}
	else
		cout<<"NO";

}

#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;

int main(){
  char arr1[20],arr2[20];
  int f=0,sum=0,s=0,d=0,a=0,len1,len2,len;
  cin>>arr1>>arr2;
  len1=strlen(arr1);
  len2=strlen(arr2);
  reverse(arr1,arr1+len1);
  reverse(arr2,arr2+len2);
  if(len1>=len2){
        len=len2;
  }else{
        len=len1;
  }
  for(int i=0;i<len;i++){
        if(arr1[i]=='0'){
            if(arr2[i]!='0'){
                f=1;
            }
        }
        sum=arr1[i]+arr2[i]-96;
        if(sum>9){
            f=1;
        }
  }
  if(f==0){
      if(len1!=len2){
        for(int i=0;i<len;i++){
            if(arr1[i]=='0'||arr2[i]=='0'){
                cout<<"NO"<<endl;
                a=1;
                break;
            }
      }
      if(a==0){
            cout<<"YES"<<endl;
      }
      }else{
        cout<<"YES"<<endl;
      }
  }
  if(f==1){
      for(int i=0;i<len;i++){
        if(arr1[i]=='0'||arr2[i]=='0'){
            s=1;
            d=1;
            cout<<"NO"<<endl;
            break;
        }
      }
      if(s==0){
          for(int i=0;i<len;i++){
            sum=arr1[i]+arr2[i]-96;
            if(sum==10||(sum==9&&arr1[i-1]+arr2[i-1]-96>10)){
                cout<<"NO"<<endl;
                d=1;
                break;
            }
          }
      }
      if(d==0){
        cout<<"YES"<<endl;
      }
  }
}

#include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
main()
{
      char str[1000000],str1[1000000],ar[1000],ar1[1000],ari[1000];
  long long    int i,j,k,m=0,d=0,sum=0,s=0;

      gets(str);
      gets(str1);
  long long    int z=atoi(str);
      int q=atoi(str1);
      sum=z+q;
      if(sum==1999999998)
      {
           cout<<"YES";
           return 0;
      }

      std::string st = std::to_string(sum);
      for(k=0;k<strlen(str)+1;k++)
      {
           if(st[k]!='0')
           {
                ari[s]=st[k];
                s++;
           }
      }
  long long    int w=atoi(ari);

      for(i=0;i<strlen(str);i++)
      {
           if(str[i]!='0')
           {
                ar[m]=str[i];
                m++;
           }
      }
      for(j=0;j<strlen(str1);j++)
      {
           if(str1[j]!='0')
           {
                ar1[d]=str1[j];
                d++;
           }
      }
long long      int r,e,v;
      r=atoi(ar);
      e=atoi(ar1);
      v=r+e;

      if(v==w)
      cout<<"YES";
      else cout<<"NO";
      return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char a[11],b[11],c[11],x[11],y[11],z[11];
    int d,e,f,g=0;
    cin>>a>>b;
    d=atoi(a);
    e=atoi(b);
    f=d+e;
    itoa(f,c,10);
    for(int i=0;i<strlen(a);++i)
    {
        if(a[i]!='0')
           {
               x[g]=a[i];
               ++g;
           }
    }
    g=0;
    for(int i=0;i<strlen(b);++i)
    {
        if(b[i]!='0')
           {
               y[g]=b[i];
               ++g;
           }
    }
    g=0;
    for(int i=0;i<strlen(c);++i)
    {
        if(c[i]!='0')
           {
               z[g]=c[i];
               ++g;
           }
    }
    if(atoi(x)+atoi(y)==atoi(z))
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
stack<int>s;
int removeZero(int num)
{
    while (num>=1)
    {
        if (num%10!=0)
        {
            s.push(num%10);
        }
        num/=10;
    }
    int ans=0;
    while (!s.empty())
    {
        ans=ans*10+s.top();
        s.pop();
    }
    return ans;
}

int main()
{
    int a,b;
    int ans=0;
    scanf("%d%d",&a,&b);
    ans=a+b;
    if (removeZero(a)+removeZero(b)==removeZero(ans))
    {
        cout<<"YES";
    }
    else
    {
        cout<<"NO";
    }
    return 0;
}

#include <bits/stdc++.h>

using namespace std;

int main()
{
    int a,b,c,a1=0,b1=0,c1=0;
    cin >> a >>b;
    bool flag=false;
    c=a+b;
    string s,s1,s2;
    s1=to_string(a);
    s2=to_string(c);
    s=to_string(b);
    s.erase(remove(s.begin(),s.end(),'0'),s.end());
    s2.erase(remove(s2.begin(),s2.end(),'0'),s2.end());
    s1.erase(remove(s1.begin(),s1.end(),'0'),s1.end());
    for(int i = 0; i<s.length(); i++)
        b1=10*b1+(s[i]-'0');
    for(int i =0; i<s1.length();i++)
        a1=10*a1+(s1[i]-'0');
    for(int i = 0; i<s2.length();i++)
        c1=10*c1+(s2[i]-'0');
    if(a1+b1!=c1)
        cout << "NO";
    else
        cout <<"YES";
}

#include<bits/stdc++.h>
using namespace std;
int no_zero_solve(int x)
{
	int ans=0;
	int k=1;
	while(x)
	{
		if(x%10!=0)
		{
			ans=ans+(x%10)*k;
			k=k*10;
		}
		x=x/10;
	}
	return ans;
}
int main()
{
	int a,b,c;
	cin>>a>>b;
	c=a+b;
	if(no_zero_solve(a)+no_zero_solve(b)==no_zero_solve(c))cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
int x,y,z,x1,y1,z1,d;
string a,a1,b1,c1,b,c;
cin>>x>>y;
z=x+y;
stringstream convert,hh,hhh;
convert<<x;
a=convert.str();
hh<<y;
b=hh.str();
hhh<<z;
c=hhh.str();

while (c.find('0')!=-1)
{
   d= c.find('0');
   c.erase(d,1);
}
while (a.find('0')!=-1)
{
   d= a.find('0');
   a.erase(d,1);
}
while (b.find('0')!=-1)
{
   d= b.find('0');
   b.erase(d,1);
}

stringstream hello(a);
if (!(hello>>x))
    x=0;

stringstream shit(b);
if (!(shit>>y))
    y=0;

    stringstream fuck(c);
    if (!(fuck>>z))
    z=0;

    if (x+y==z)
        cout<<"YES";
    else
        cout<<"NO";
}

#include<cstdio>
#include<iostream>
#include<algorithm>
#include<cstring>
#include<cctype>
#include<queue>
#include<vector>
#include<cmath>
using namespace std;
int a,b,sum,tsum;
int work(int x){
	int res=0;
	int cnt=0,c[19]={0};
	while(x){
		if(x%10){
			c[++cnt]=x%10;
		}
		x/=10;
	}
	for(int i=cnt;i>=1;--i) res=res*10+c[i];
	return res;
}
int main(){
	cin>>a>>b; sum=a+b;
	a=work(a); b=work(b); tsum=work(sum);
	if(a+b==tsum){
		puts("YES");
	}
	else{
		puts("NO");
	}
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int no_zero(int x)
{
	int cnt=0;
	int y=1;
	while(x)
	{
		if(x%10!=0)
		{
			cnt=cnt+(x%10)*y;
			y=y*10;
		}
		x=x/10;
	}
	return cnt;
}
int main()
{
	int a,b;
	cin>>a>>b;
	if(no_zero(a)+no_zero(b)==no_zero(a+b))cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}

#include<iostream>
#include<string>
#include<sstream>
#include<algorithm>
#include <fstream>
#include <string.h>
#include <cstdlib>
using namespace std;
int main()
{
    int x, y,z;
    string s1,s2;
    cin >> s1;
    cin >> s2;
    istringstream(s1) >> x;
    istringstream(s2) >> y;
    z = x + y;
    for (int i = 0; i < s1.size(); i++)
    {
        if (s1[i] == '0')
        {
            s1.erase(i, 1);
                i--;
        }
    }
    for (int i = 0; i < s2.size(); i++)
    {
        if (s2[i] == '0')
        {
            s2.erase(i, 1);
            i--;
        }
    }
    istringstream(s1) >> x;
    istringstream(s2) >> y;

    stringstream ss;
ss << z;
string str = ss.str();

    for (int i = 0; i < str.size(); i++)
    {
        if (str[i] == '0')
        {
            str.erase(i, 1);
            i--;
        }
    }
    istringstream(str) >> z;

    if (z == y + x)
    {
        cout << "YES" << endl;
    }
    else
    {
        cout << "NO" << endl;
    }
    return 0;
}

// QUARANTINE DAYS..;)
#include <bits/stdc++.h>
using namespace std;
#define endl                "\n"
#define test                long long int tt;cin>>tt;while(tt--)
#define rep(i,a,b)      for(long long int i=a;i<b;i++)
#define rev(i,a,b)      for(long long int i=b-1;i>=a;i--)
#define reep(i,a,b)     for(long long int i=a;i<=b;i++)
#define ll                          long long int
#define pb                          push_back
#define mp                          make_pair
#define fi                          first
#define se                          second
#define MOD                 1000000007
#define PI                          acos(-1.0)
#define assign(x,val)   memset(x,val,sizeof(x))
#define prec(val, dig)  fixed << setprecision(dig) << val
#define vec(vct)            vector < ll > vct
#define vecpi(vct)          vector < pair < ll, ll > > vct
#define pi                          pair < ll , ll >
#define pii                     pair < pair < ll, ll >, ll >
#define lower(str)              transform(str.begin(), str.end(), str.begin(), ::tolower);
#define upper(str)              transform(str.begin(), str.end(), str.begin(), ::toupper);
const int maxm = 2e6 + 10;

void fast() {
        ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#ifndef ONLINE_JUDGE
        freopen("input.txt", "r", stdin);
        freopen("output.txt", "w", stdout);
#endif
}
/**********====================########################=================***********/

int removeZeros(int num) {
        int ret = 0;
        int ten = 1;
        while (num) {
                int dig = num % 10;
                num /= 10;
                if (dig) {
                        ret += dig * ten;
                        ten *= 10;
                }
        }
        return ret;
}

int main() {
        fast();
        int a, b, c;
        cin >> a >> b;
        c = a + b;
        a = removeZeros(a);
        b = removeZeros(b);
        c = removeZeros(c);
        if (a + b == c)
                cout << "YES" << endl;
        else
                cout << "NO" << endl;
        return 0;
}

/*
    auto start = chrono::steady_clock::now();
    auto finish = chrono::steady_clock::now();
    auto elapsed_ms = chrono::duration_cast<chrono::milliseconds>(finish - start);
    cout << endl << "Time: " << elapsed_ms.count() << " ms\n";
*/

#include <bits/stdc++.h>
#include <chrono>
#define watch(x) cout << (#x) << " is " << (x) << endl
#define eps 1e-9

typedef long long ll;

using namespace std;

ll solve (string s) {

    string a;

    for (int i = s.size()-1; i >= 0; i--) if (s[i] != '0') a+=s[i];

    reverse(a.begin(), a.end());

    ll ans = stoi(a);

    return ans;
}

int main()

{
    ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);

    string a, b;

    cin >> a >> b;

    ll x = stoi(a);
    ll y = stoi(b);
    ll s = x+y;

    string sum = to_string(s);

    x = solve(a);
    y = solve(b);
    s = solve(sum);

    cout << (s == x+y ? "YES" : "NO");

    return 0;
}

#include <bits/stdc++.h>
#include<math.h>
using namespace std;

int main(int argc, char const *argv[])
{
int m,n;
cin>>m>>n;
int sum=m+n;
string l="";
string s=to_string(sum);

for(int i=0;i<s.size();i++)
{
if(s[i]!='0')
	l+=s[i];
}
sum=stoi(l);

//cout<<sum<<endl;
string s1=to_string(m);
string s2=to_string(n);
string s3="",s4="";
for(int i=0;i<s1.size();i++)
{
if(s1[i]!='0')
	s3+=s1[i];
}
for(int i=0;i<s2.size();i++)
{
if(s2[i]!='0')
	s4+=s2[i];
}
//cout<<s3<<" "<<s4<<endl;

int x=stoi(s3);
int y=stoi(s4);
int z=x+y;

if(sum==z)
	cout<<"YES"<<endl;
else
	cout<<"NO"<<endl;

}

#include<stdio.h>
int ohyes(int i)
{
	int j,sum=0,p=1;
	while(i!=0)
	{
		j=i%10;
		if(j==0)
		{
			i=i/10;
			continue;
		}
		j=p*j;
		sum=sum+j;
		p=p*10;
		i=i/10;
	}
	return sum;
}
int main()
{
	int a,b,c;
	scanf("%d",&a);
	scanf("%d",&b);
	c=a+b;
	if(ohyes(c)==(ohyes(a)+ohyes(b)))
	{
		printf("YES");
	}
	else
	{
		printf("NO");
	}
	return 0;
}

#include <iostream>
#include <sstream>
#include <string>
#include <math.h>
using namespace std;

int number( string s)
{ int num=0,c =s.length()-1;
 int p=1;
     for(int i=0;i<s.length();i++){
        for(int j=0;j<=9;j++){
        if (int(s[i])==(48+j)){
        for(int k=0;k<c;k++)
        p=p*10;
        num+=(j*p);
        }
        }
        p=1;
        c--;
    }

    return num;
}

bool remove_zeroos(int num1,int num2,int num3){
stringstream ss1,ss2,ss3;
string s1,s2,s3;
ss1<<num1;
ss1>>s1;
ss2<<num2;
ss2>>s2;
ss3<<num3;
ss3>>s3;
string n1,n2,n3;
for (int i=0;i<s1.length();i++)
{if (s1[i]!='0')
 n1+=s1[i];
}

for (int i=0;i<s2.length();i++)
{if (s2[i]!='0')
 n2+=s2[i];
}

for (int i=0;i<s3.length();i++)
{if (s3[i]!='0')
 n3+=s3[i];
}

int N1,N2,N3;
N1=number(n1);
N2=number(n2);
N3=number(n3);
int n4=N1+N2;
if(n4==N3)
 return true;
 else return false;
}

int main(){
    int a,b,c;
cin>>a>>b;
c=a+b;
if (remove_zeroos(a,b,c)==true)
cout<<"YES";
else
cout<<"NO";

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define int long long int
#define double long double
#define f1 first
#define s1 second
#define mp make_pair
#define pb push_back
#define MOD 1000000007
#define test int t;cin>>t;while(t--)
#define pie 3.1415926536
#define all(c) c.begin(), c.end()
typedef vector<int>vi;
typedef pair<int,int>pii;
typedef vector<pair<int,int>>vii;
struct abc{int y,x;};
bool compare(abc a1,abc a2){if(a1.x==a2.x)return a1.y<a2.y;return a1.x<a2.x;}
const int mod=1e9+7;
int a[3000],b[100005];
int s(int a)
{
        int x=0,t=1;
        while(a){
        if(a%10)
          {
        x+=a%10*t;
        t*=10;
        }
        a/=10;
}
 return x;
}
int32_t main(){
        FAST;
        int a,b;
        cin>>a>>b;
        int c=a+b;
        if(s(c)==s(a)+s(b))cout<<"YES";
        else cout<<"NO";
}

#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int f(int n)
{
    int r = 0, tens = 1;
    while (n > 0)
    {
        int d = n % 10;
        n /= 10;
        if (d > 0)
        {
            r += d * tens;
            tens *= 10;
        }
    }
    return r;
}
int main()
{
    ll a, b, c;
    cin >> a >> b;
    c = a + b;
    a = f(a);
    b = f(b);
    c = f(c);
    cout << (a + b == c ? "YES" : "NO");
}

#include <iostream>
#include <sstream>
#include <string>

using namespace std;

string eraseZeroes(string s){
    string res = "";
    for (int i=0;i<s.length();i++)
        if ( s[i] != '0' ) res += s[i];
    return res;
}

int toInt(string s){
    int res = 0;
    for (int i=0;i<s.length();i++){
        res = res*10 + s[i] - '0';
    }
    return res;
}

string convert(int x){
    stringstream in;
    in <<x;
    string res;
    in >>res;
    return res;
}

int main (){
    string s, t;
    cin >>s>>t;

    string ns = eraseZeroes(s);
    string nt = eraseZeroes(t);

    string temp = eraseZeroes(convert(toInt(s) + toInt(t)));

    if ( toInt(temp) == toInt(ns) + toInt(nt) )
        cout <<"YES"<<endl;
    else
        cout <<"NO"<<endl;

    return 0;
}

#include<bits/stdc++.h>
#define ll long long int
using namespace std;

ll rmv(ll n)
{
    string s=to_string(n);
    string temp;
    for(ll i=0;i<s.size();i++)
    {
        if(s[i]!='0')
            temp.push_back(s[i]);
    }
    return stoll(temp);
}

int main()
{
    ll a,b;
    cin>>a>>b;
    ll sm=a+b;
    ll x=rmv(a);
    ll y=rmv(b);
    ll sum=rmv(sm);

    if(x+y==sum)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;

    return 0;
}

#include <iostream>
#include<math.h>
using namespace std;

int a,b,c,x;

int n(int t){
    x=0;
    int pp=1;
    for(int i=0;t!=0;i++){
    int p=t%10;

    if(p!=0){
     x+=p*pp;
     pp*=10;}

    t=t/10;
    }
    return x;
}

int main() {
    cin>>a>>b;
    c=a+b;

    a=n(a);
    b=n(b);
    c=n(c);

    if(a+b==c)
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;
    return 0;
}

/******************************************************************************

                              Online C++ Compiler.
               Code, Compile, Run and Debug C++ program online.
Write your code in this editor and press "Run" button to compile and execute it.

*******************************************************************************/

#include <iostream>
#include <bits/stdc++.h>

using namespace std;

int without(int n)
{
    int rem,i=0,sum=0;
    while(n)
    {
        rem=n%10;
        n=n/10;
        if(rem!=0)
        {
            sum=sum+rem*pow(10,i);
            i++;
        }
    }
    return sum;
}

int main()
{
    int a,b,c,a1,b1,c1;
    cin>> a >>b;
    c=a+b;
    a1=without(a);
    b1=without(b);
    c1=without(c);
    if(c1==(a1+b1)) cout<<"YES";
    else cout<<"NO";
}

 #include <bits/stdc++.h>
#include <vector>
#include <string.h>
#include <math.h>

using namespace std;

 int finds(int n){

  int ans=0,units=1;

    while(n){
    int rem = n%10;
     n = n/10;
     if(rem){
      ans += rem*units;
      units = units*10; }
     }

    return ans;
 }

 int main(){

  int a,b,c;
  cin>>a>>b;
  int sum  = a+b;

   a = finds(a);
    b = finds(b);
    c = finds(sum);

   if(c == a+b) cout<<"YES"<<endl;
   else cout<<"NO"<<endl;

 return 0;
 }

#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
    unsigned long long num1 , num2 , answer;
    string numone , numtwo ,Answer;
    stringstream x , y , z;
    stringstream a , b , c;

    cin >> num1 >> num2 ;
    answer=num1+num2;

    x << num1;
    y << num2;
    z << answer;

    x >> numone ;
    y >> numtwo ;
    z >> Answer ;

    for(int i=0 ; i<numone.length() ; i++){
    if(numone[i]=='0')
    {
    numone.erase(numone.begin()+i);
    i--;}
    }

    for(int j=0 ; j<numtwo.length() ; j++){
    if(numtwo[j]=='0')
    {
    numtwo.erase(numtwo.begin()+j);
    j--;}
    }

    for(int k=0 ; k<Answer.length() ; k++){
    if(Answer[k]=='0'){
    Answer.erase(Answer.begin()+k);k--;}
    }

    a << numone;
    b << numtwo;
    c << Answer;

    a >> num1;
    b >> num2;
    c >> answer;

    if (num1+num2==answer)
    cout << "YES" << endl;

    if(num1+num2!=answer)
    cout << "NO" << endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;

int main()
{
    int n1,n2;
    cin>>n1>>n2;
    int total=n1+n2;
    int c[1000];
    int k2=0;
    int flag=0;
    int z=total;

    while(total!=0)
    {
        int r=total%10;
        total=total/10;
        if(r!=0)
        {
            c[k2]=r;
            k2++;
        }
        else
        {
            flag=1;
        }
    }
    reverse(c,c+k2);
    if(flag==1){
    int s5=0;
    for(int i=0;i<k2;i++)
    {
        s5=s5*10+c[i];
    }
    total=s5;
    }
    else
    {
        total=z;
    }
    //cout<<"TOTAL:"<<total<<endl;

    int a[1000],b[10000];
    int k=0;
    int k1=0;
    while(n1!=0)
    {
        int r=n1%10;
        n1=n1/10;
        if(r!=0)
        {
            a[k]=r;
            k++;
        }
    }

    while(n2!=0)
    {
        int r=n2%10;
        n2=n2/10;
        if(r!=0)
        {
            b[k1]=r;
            k1++;
        }
    }

    reverse(a,a+k);
    reverse(b,b+k1);
    //cout<<"k:"<<k<<" "<<k1<<endl;
    //int s=0,s1=0;
    if(k1>=k)
    {
        int diff=k1-k;
        for(int i=0;i<diff;i++)
        {
            for(int j=k1;j>0;j--)
            {
                a[j]=a[j-1];
            }
        }
        for(int i=0;i<diff;i++)
        {
            a[i]=0;
        }
      /*   for(int i=0;i<k1;i++)
    {
        cout<<a[i];
    }
    cout<<endl;
    for(int i=0;i<k1;i++)
    {
        cout<<b[i];
    }*/
       int s=0;
       for(int i=0;i<k1;i++)
      {
        s=s*10+a[i];
      }
       int s1=0;
       for(int i=0;i<k1;i++)
      {
         s1=s1*10+b[i];
      }
      int res=s+s1;
     //cout<<res<<endl;
     if(res==total)
     {
         cout<<"YES"<<endl;
     }
     else
      {
         //cout<<"n"<<endl;
         cout<<"NO"<<endl;
         //cout<<"1"<<endl;
      }
    }
    //cout<<"out"<<endl;
    if(k1<k)
    {
        //cout<<"in"<<endl;
        int diff=k-k1;
        for(int i=0;i<diff;i++)
        {
            for(int j=k;j>0;j--)
            {
                //cout<<"IN"<<endl;
                b[j]=b[j-1];
            //cout<<"j:"<<j<<endl;
            }
        }
         for(int i=0;i<diff;i++)
        {
            //cout<<"zero"<<i<<endl;
            b[i]=0;
        }
         /*for(int i=0;i<k;i++)
    {
        cout<<a[i];
    }
    cout<<endl;
    for(int i=0;i<k;i++)
    {
        cout<<b[i];
    }
     cout<<endl;*/

     int s=0;
     for(int i=0;i<k;i++)
    {
        s=s*10+a[i];
    }
     int s1=0;
     for(int i=0;i<k;i++)
    {
        s1=s1*10+b[i];
    }
    int res=s+s1;
     //cout<<res<<endl;
     if(res==total)
     {
          cout<<"YES"<<endl;
     }
     else
     {
         cout<<"NO"<<endl;
     }
    }

}

#include<bits/stdc++.h>

using namespace std;

long long a, b, S, A[20], B[20], sum[20], cnt, cnt_a, cnt_b;

int main ()
{
    cin >> a >> b;
    S = a + b;
    while(S){
        sum[++cnt] = S % 10;
        S /= 10;
    }
    reverse(sum + 1, sum + 1 + cnt);
    for(int i = 1; i <= cnt; i++)
    {
        if(sum[i])
            S = S * 10 + sum[i];
    }
    while(a)
    {
        A[++cnt_a] = a % 10;
        a /= 10;
    }
    while(b)
    {
        B[++cnt_b] = b % 10;
        b /= 10;
    }
    a = b = 0;
    reverse(A + 1, A + cnt_a + 1);
    reverse(B + 1, B + cnt_b + 1);
    for(int i = 1; i <= cnt_a; i++)
        if(A[i])
            a = a * 10 + A[i];
    for(int i = 1; i <= cnt_b; i++)
        if(B[i])
            b = b * 10 + B[i];
    if(a + b == S)
        cout << "YES";
    else cout << "NO";
}

#include<bits/stdc++.h>
using namespace std;
long long a,b,c,ta,tb,tc,ansa,ansb,ansc;
int main()
{
    cin>>a>>b;
	c=a+b;
    while(a)
        ta=(a%10==0)?ta:ta*10+a%10,a/=10;
    while(b)
        tb=(b%10==0)?tb:tb*10+b%10,b/=10;
    while(c)
        tc=(c%10 ==0)?tc:tc*10+c%10,c/=10;
    while(ta)
        ansa=(ta%10==0)?ansa:ansa*10+ta%10,ta/=10;
    while(tb)
        ansb=(tb%10==0)?ansb:ansb*10+tb%10,tb/=10;
    while(tc)
        ansc=(tc%10==0)?ansc:ansc*10+tc%10,tc/=10;
    if(ansa+ansb==ansc)
        cout<<"YES";
    else
        cout<<"NO";
}

#include <iostream>
using namespace std;
int a,b,c,t=0;
long long devn(long long x){
    long long z=0;
    while (x!=0)
    {
        if(x%10!=0)
            z=z*10+x%10;
        x/=10;
    }
    x=0;
    while(z!=0){
    x=x*10+z%10;
    z/=10;
    }
return x;
}

int main() {
     cin>>a>>b;
    c=a+b;
    if(devn(c)==devn(a)+devn(b))
   cout<<"YES";
    else
   cout<<"NO";
    return 0;
}

// I love natalia

#include <iostream>
#include <cstdio>

using namespace std;

int doMagic(int x) {
    int res = 0;
    int d = 1;

    while (x) {
        if (x%10) {
            res += x%10*d;
              d *= 10;
        }

        x /= 10;
    }

    return res;
}

int main() {
#ifndef ONLINE_JUDGE
    freopen("input.txt", "rt", stdin);
#endif

    int a, b;
    cin >> a >> b;

    int c = a + b;

    cout << ((doMagic(c) == doMagic(a) + doMagic(b)) ? ("YES") : ("NO"));

exit:
    return ( 0 );
}

#include <iostream>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> ii;

int removezero(int n) {
    int res, rem;
    res = 0;
    int ten = 1;
    while (n) {
        rem = n % 10;
        n /= 10;
        if (rem) {
            res = res + rem * ten;
            ten *= 10;
        }
    }
    return res;
}
int main() {
    int a, b, c, ccomp;
    cin >> a >> b;
    c = a + b;
    a = removezero(a);
    b = removezero(b);
    c = removezero(c);
    if (c == a+b)
        cout << "YES";
    else
        cout << "NO";
    return 0;
}

/*
 * by okay__
 * 17:14 13_Oct_2020
 */
#include <bits/stdc++.h>

using namespace std;
#define endl '\n'

int main() {
    string a, b;
    cin >> a >> b;
    string s = to_string(stoll(a) + stoll(b));

    string aa, bb, s1;
    for (auto c : a)
        if (c != '0')
            aa += c;

    for (auto c : b)
        if (c != '0')
            bb += c;

    for (auto c : s)
        if (c != '0')
            s1 += c;

    string s2 = to_string(stoll(aa) + stoll(bb));

    cout << (s1 == s2 ? "YES\n" : "NO\n");

    return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,b,sum;
int conv(int n)
{
    int tt;
	int d=0,t=1;
	while(n>0)
	{
		if(n%10!=0)
		d=d+(n%10)*t,t*=10;
		n/=10;
	}
	return d;
}
int main ()
{
	cin>>a>>b;
	sum=a+b;
	a=conv(a);
	b=conv(b);
	sum=conv(sum);
	if(sum==a+b)
	cout<<"YES";
	else
	cout<<"NO";
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main()
    {
    long int n,m;
    cin>>n>>m;
    long int r = n+m;
    string s1,s2;
    s1=to_string(n);
    s2 =to_string(m);
    string s3="",s4="";
    string s6=to_string(r);
    for(auto c:s1)
    {
        if(c=='0')
            continue;
        else
            {

            string k(1,c);
            s3.append(k);
            }
    }
    for(auto c:s2)
    {
        if(c=='0')
            continue;
        else

          {
                 string k(1,c);
            s4.append(k);
    }}
    string s5="";
    for(auto c:s6)
    {
        if(c=='0')
            continue;
        else
        {

             string k(1,c);
            s5.append(k);
    }}
    if(stoi(s5)==stoi(s4)+stoi(s3))
            cout<<"YES";
    else
        cout<<"NO";
    return 0;
    }

#include <bits/stdc++.h>
using namespace std;
const int N=1e9+7;
int x,y,digit_1,digit_2,ans,di;
bool flag,flag2;
int main()
{
    scanf("%d%d",&x,&y);
    ans=x+y;
    while(x>0&&y>0){
        digit_1=x%10;
        digit_2=y%10;
        if(digit_1==0||digit_2==0) flag2=1;
        if(digit_1+digit_2>9||digit_1==0&&digit_2>0||digit_2==0&&digit_1>0) flag=1;
        x/=10,y/=10;
    }
    int v=max(x,y);
    while(v>0){
        if(v%10==0) flag2=1;
        v/=10;
    }
    if(!flag2){
        while(ans>0){
            int di=ans%10;
            if(di==0){puts("NO");return 0;}
            ans/=10;
        }
    }
    if(flag&&flag2) puts("NO");
    else puts("YES");
    return 0;

}

#include<stdio.h>
int sh(int n)
{
    int m=n,sum=0,i=1;
    while(m)
    {
        int a=m%10;
        if(a!=0)
        {
            sum+=a*i;
            i*=10;
        }
        m/=10;
    }
    return sum;
}
int main()
{
    long long m,n;
    scanf("%I64d%I64d",&m,&n);
    long long c=m+n;
    long long sum1,sum2,sum3;
    sum1=sh(m);
    sum2=sh(n);
    sum3=sh(c);
    if(sum1+sum2==sum3)
        printf("YES\n");
    else
        printf("NO\n");
}
//2019-11-16 12:53:29.773

#include <iostream>
#include <vector>
#include <string>
#include <sstream>
#include <cstring>
#include <string.h>
#include <algorithm>
#include <set>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <math.h>
#include <fstream>

using namespace std;

int main()
{
    int x[3];
    string s[3];
    stringstream ss;

    cin >> x[0] >> x[1];
    x[2] = x[0] + x[1];

    for (int i = 0; i < 3; i++)
    {
        ss << x[i]; ss >> s[i]; ss.clear();
    }

    for (int t = 0; t < 3; t++)
    for (int i = 0; i < s[t].size();i++)
        if (s[t][i] == '0')
        {   s[t].erase(i, 1);   i--;    }

    for (int i = 0; i < 3; i++)
    {
        ss << s[i]; ss >> x[i];
        ss.clear();
    }

    if (x[0] + x[1] == x[2])
        cout << "YES\n";
    else cout << "NO\n";

}

#include <iostream>
#include <cmath>
#include <algorithm>
#include <string>
#include <vector>
#include <string.h>
#include <sstream>
#include <cstring>
#include<bits/stdc++.h>
#define O(n) for(int i = 0; i < n; ++i)

using namespace std;

int main() {

    long long x, y, z;
    cin >> x >> y;
    z = x + y;
    string a, b, c;
    a = to_string(x);
    b = to_string(y);
    c = to_string(z);
    a.erase(std::remove(a.begin(), a.end(), '0'), a.end());
    b.erase(std::remove(b.begin(), b.end(), '0'), b.end());
    c.erase(std::remove(c.begin(), c.end(), '0'), c.end());
    z = stoll(a) + stoll(b);
    if(to_string(z) == c)
        cout << "YES\n";
    else
        cout << "NO\n";
}
    /*int l = x.length() > y.length()? y.length(): x.length();
    if(x.length() > y.length())
        x = x.substr(x.length()- y.length());
    else if(x.length() < y.length())
        y = x.substr(y.length()- x.length());
    for(int i = 0; i < l; ++i){
        if(x[i] == '0' && y[i] == '0'){
            if((x[i+1 == x.length()? i:i+1]-'0'+y[i+1 == y.length()? i:i+1]-'0') >= 10) {
                cout << "NO";
                return 0;
            }
        }else if(x[i] == '0' || y[i] == '0'){
            cout <<"NO";
            return 0;
        }
    }
    cout <<"YES";
}

 /*int main(){
    string x, y;
    cin >> x >> y;
    int k = count (x.begin(), x.end(), '0');
    int m = count (y.begin(), y.end(), '0');
    if(k+m == 0){
        cout <<"YES";
        return 0;
    }
    for(int i = 0; i < x.length(); ++i){
        if((x[i] - '0') + (y[i] - '0') > 9 && (x[i+1] == '0' || y[i+1] == '0' || x[i-1] == '0' || y[i-1] == '0') ){
            cout << "NO";
            return 0;
        }
    }
    cout << "YES";
}*/
 /*long  k(string x){
     long a = 0;
     for(int i = x.length()-1; i >= 0; --i){
         a+= (x[i] - '0')*pow(10,x.length()-1-i);
     }
     return a;
 }
 int MM(string x, string y, string z){
     int a = 0, b = 0, c = 0;
     for(int i = x.length()-1; i >= 0; --i){
         a+= (x[i] - '0')*pow(10,x.length()-1-i);
     }
     for(int i = y.length()-1; i >= 0; --i){
         b+= (y[i] - '0')*pow(10,y.length()-1-i);
     }
     for(int i = z.length()-1; i >= 0; --i){
         c+= (z[i] - '0')*pow(10,z.length()-1-i);
     }
     return a+b+c;
 }*/

# define _CRT_SECURE_NO_WARNINGS
//#include <bits/stdc++.h>
# include <algorithm>
# include <iostream>
# include <sstream>
# include <string>
# include <vector>
# include <cstdio>
# include <iterator>
# include <list>
# include <map>
# include <stack>
# include <algorithm>
# include <queue>
# include <deque>
# include <set>
# include <iomanip>
# include <fstream>
# include <cmath>
# include <bitset>
# define ll long long
using namespace std;
void speed()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
void form_binary_to_dicimal_and_opposite() {
	int n = 5;
	string binary = bitset<8>(n).to_string();
	cout << binary << endl;
	string s = "111";
	cout << stoi(binary, 0, 2) << endl;
}
void solve(int a, int b)
{
	string a1 = to_string(a), b1 = to_string(b), c = to_string(a + b);
	for (int i = 0;i < a1.length();i++)if (a1[i] == '0') {
		a1.erase(a1.begin() + i);i--;
	}
	for (int i = 0;i < b1.length();i++)if (b1[i] == '0') {
		b1.erase(b1.begin() + i);i--;
	}
	for (int i = 0;i < c.length();i++)if (c[i] == '0') {
		c.erase(c.begin() + i);i--;
	}
	string c1 = to_string(stoi(a1) + stoi(b1));
	(c1 == c) ? cout << "YES" << endl : cout << "NO" << endl;
}
int main()
{
	speed();
	int a, b;cin >> a >> b;
	solve(a,b);
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int a,b,c;
stack<int>s;
int via(int x)
{
	while(x)
	{
		if(x%10!=0)s.push(x%10);
		x/=10;
	}
	int ans=0;
	while(!s.empty())
	{
		ans=ans*10+s.top();
		s.pop();
	}
	return ans;
}
int main()
{
	cin>>a>>b;
	c=a+b;
	if(via(a)+via(b)==via(c))cout<<"YES";
	  else cout<<"NO";
	return 0;
}

#include <bits/stdc++.h>
using namespace std;
long long a,b,ans,tmpa,tmpb,tmpans,ttmpa,ttmpb,ttmpans;
int main()
{
    cin>>a>>b;
	ans=a+b;
    for(;a;a/=10)
        tmpa=(a%10==0)?tmpa:tmpa*10+a%10;
    for(;b;b/=10)
        tmpb=(b%10==0)?tmpb:tmpb*10+b%10;
    for(;ans;ans/=10)
        tmpans=(ans%10==0)?tmpans:tmpans*10+ans%10;
    for(;tmpa;tmpa/=10)
        ttmpa=(tmpa%10==0)?ttmpa:ttmpa*10+tmpa%10;
    for(;tmpb;tmpb/=10)
        ttmpb=(tmpb%10==0)?ttmpb:ttmpb*10+tmpb%10;
    for(;tmpans;tmpans/=10)
        ttmpans=(tmpans%10==0)?ttmpans:ttmpans*10+tmpans%10;
    if(ttmpa+ttmpb==ttmpans)cout<<"YES";
    else cout<<"NO";

}

#include <bits\stdc++.h>
int main(void)
{
	char a[100],b[100],z[100],c[100],d[100],y[100];
	int result;
	scanf("%s",a);
	scanf("%s",b);
	result=(atoi(a)+atoi(b));
	itoa(result,z,10);
	int j=0,i=0,h=0;
	for(int i=0;i<strlen(a);i++)
	{
		if(a[i]=='0')
			continue;
		else
		{
			c[j] = a[i];
			j++;

		}
	}
	for(int j=0;j<strlen(b);j++)
	{
		if(b[j]=='0')
			continue;
		else
		{
			d[i]=b[j];
			i++;
		}
	}
	for(int i=0;i<strlen(z);i++)
	{
		if(z[i]=='0')
			continue;
		else
		{
			y[h]=z[i];
			h++;
		}
	}
	int result2=(atoi(c)+atoi(d));
	if(result2==atoi(y))
		printf("YES");
	else
		printf("NO");
}

#include <iostream>
using namespace std;
int nozero (int x1){
int m=1, k=0, x=0;
while(x1>0){
    k=x1%10;
x=x+k*m;
if(k!=0) m=m*10;
x1/=10;
}
return x;
}
int main () {
int x,y,sum;
cin>>x>>y;
sum=x+y;
if(nozero(x)+nozero(y)==nozero(sum))
cout<<"YES";
else cout<<"NO";

}

#include<iostream>
#include<sstream>
#include<algorithm>
#include<iomanip>
#include<string>
using  namespace std;
int Remove(int n)
{
    string s;

    stringstream ss;
    ss << n;
    ss >> s;
    ss.clear();

    for(int i=0; i<s.size(); i++)
    {
        if(s[i]=='0')
        {
            s.erase(i,1);
            i--;
        }
    }

    ss << s;
    ss >> n;
    ss.clear();

    return n;
}
int main()
{
    int a,b,c;
    cin >> a >> b;
    c=a+b;

    if(Remove(c)==Remove(a)+Remove(b))
    {
        cout << "YES";
    }
    else cout << "NO";
}

#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <iomanip>
#include <climits>

using namespace std;

string add( string s1, string s2 ) {
    int rest = 0;
    string answer;
    string::reverse_iterator i1 = s1.rbegin(),
                             i2 = s2.rbegin();

    answer.reserve( max(s1.size(),s2.size())+2 );
    while( i1 != s1.rend() && i2 != s2.rend() ) {
        int result = (*i1-'0')+(*i2-'0');
        result += rest;
        rest = result/10;
        result %= 10;
        answer += (char)result + '0';

        ++i1;++i2;
    }
    if( i1 != s1.rend() ) {
        for_each( i1, s1.rend(), [&]( char n ) {
            int result = n-'0'+rest;
            answer += (char)result+'0';
            rest = result/10;
            result %= 10;
        });
    }
    if( i2 != s2.rend() ) {
        for_each( i2, s2.rend(), [&]( char n ) {
            int result = n-'0'+rest;
            answer += (char)result+'0';
            rest = result/10;
            result %= 10;
        });
    }

    reverse( answer.begin(), answer.end() );
    return answer;
}

int main() {
    string s1, s2;

    cin >> s1 >> s2;

    string r1 = add(s1,s2);

    s1 = string( s1.begin(), remove( begin(s1), end(s1), '0' ) );
    s2 = string( s2.begin(), remove( begin(s2), end(s2), '0' ) );
    r1 = string( r1.begin(), remove( begin(r1), end(r1), '0' ) );

    string r2 = add(s1,s2);

    if( r1 != r2 ) {
        cout << "NO" << endl;
    }
    else {
        cout << "YES" << endl;
    }

    return 0;
}

#include <iostream>
#include <cmath>
using namespace std;
int fun(int n)
{
    int sum=0;
    int t=-1;
    while(n)
    {
        int k=n%10;
        if(k)
        t++;
        sum+=pow(10,t)*k;
        n=n/10;
    }
    return sum;
}
int main()
{
 int a,b,c;
 cin>>a>>b;
 c=a+b;
 int x=fun(a);
 int y=fun(b);
 int z=fun(c);
 x+y==z?cout<<"YES":cout<<"NO";
 return 0;
}

#include<bits/stdc++.h>
using namespace std;
int num(int u)
{
	stringstream ss;string a,b;int ans;
	ss.clear();
	ss<<u;ss>>a;
	for(int i=0;i<a.size();i++)
		if(a[i]!='0')
			b+=a[i];
	ss.clear();
	ss<<b;ss>>ans;
	return ans;
}
int main()
{
	int a,b;
	cin>>a>>b;
	if(num(a)+num(b)==num(a+b))
		cout<<"YES";
	else
		cout<<"NO";
}

#include<bits/stdc++.h>
using namespace std;
int al,bl,cl;
int a[15],b[15],c[15];
void go(int k,int x){
	while(k>0){
		if(k%10!=0){
			if(x==1) a[++al]=k%10;
			if(x==2) b[++bl]=k%10;
			if(x==3) c[++cl]=k%10;
		}
		k/=10;
	}
}
int _new_(int x,int len){
	int cnt=1;
	int sum=0;
	for(int i=1;i<=len;i++){
		if(x==1) sum+=a[i]*cnt;
		if(x==2) sum+=b[i]*cnt;
		if(x==3) sum+=c[i]*cnt;
		cnt*=10;
	}
	return sum;
}
int x,y,z;
int xx,yy,zz;
int main(){
	scanf("%d%d",&x,&y);
	int z=x+y;
	go(x,1);
	go(y,2);
	go(z,3);
	xx=_new_(1,al);
	yy=_new_(2,bl);
	zz=_new_(3,cl);
	if(xx+yy==zz) printf("YES");
	else printf("NO");

	return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long int
int main()
{

    ll a,b,c=0,carry=0,i=0,ii=0;
    cin>>a>>b;

    while(1)
    {
        ll kk, k;
        k=a%10;
        kk=b%10;
         if(a==0 && b==0)
        {
            if(k+kk+c!=10)
            cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
            return 0;
        }
        if(k+kk+c==10 || k==0 && kk!=0 && a!=0 || kk==0 && k!=0 && b!=0 )
        {
            cout<<"NO"<<endl;return 0;
        }
        if(k==0 && kk==0 && c==1)
        {
            cout<<"NO"<<endl;return 0;
        }
        if(k+kk+c>10)
            c=1;
        else
            c=0;

        if(a==0 && b==0)
        {
            if(k+kk+c!=10)
            cout<<"YES"<<endl;
            else
                cout<<"NO"<<endl;
            return 0;
        }
         a=a/10;b=b/10;
         i=k;ii=kk;
    }

}

#include <iostream>

// Remove 0s
int r(int x) {
    int s = 0;
    int m = 1;
    while (x>0) {
        if (x%10!=0) {
            s += m * (x%10);
            m *= 10;
        }
        x = x/10;
    }
    return s;
}

int main() {
    int a, b, s;
    std::cin >> a >> b;

    //std::cout << r(a) << " " << r(b) << " " << r(a+b) << std::endl;
    std::cout << ((r(a) + r(b) == r(a+b)) ? "YES" : "NO");

    return 0;
}

#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>

#include <string>
#include <vector>
#include <stack>
#include <set>
#include <queue>
#include <algorithm>
using namespace std;

#define ull unsigned long long int
#define ll long long int

#define MK make_pair

#define REP(i, n) for (int i = 0; i < (n); ++i)
#define REP1(i, n) for (int i = (n) - 1; i >= 0; --i)
#define FOR(i, a, b) for (int i = (a); i <= (b); ++i)
#define FOR1(i, a, b) for (int i = (a); i >= (b); --i)
#define FORH(i, a, b, h) for (int i = (a); i <= (b); i += (h))
#define FOR1H(i, a, b, h) for (int i = (a); i >= (b); i -= (h))

#define SIZE(a) (int)(a).size()

const ll MOD = 1e9 + 7;
const int N = 1e4+10;
const int V = 1e5;
const ll E = 4LL * V * V;

string ans(int a){
    string s = "";
    char s1[11];
    sprintf(s1, "%d", a);

    REP(i, strlen(s1)){
        if(s1[i] != '0'){
            s += s1[i];
        }
    }
    return s;
}

int main(){
    int a, b;
    scanf("%d%d", &a, &b);

    int c = a + b;

    string s1 = ans(a);
    string s2 = ans(b);
    string s3 = ans(c);

    a = atoi(s1.c_str());
    b = atoi(s2.c_str());
    c = atoi(s3.c_str());

    if(a + b == c){
        puts("YES");
    }else{
        puts("NO");
    }
    return 0;
}

#include<iostream>
using namespace std;
int nozero(long int n)
{
	int rem;
	while (n)
	{
		rem = n % 10;
		n = n / 10;
		if (rem == 0)
		{
			return nozero(n );
		}
		else
		{
			return (nozero(n))*10 + rem;
		}
	}
	return 0;
}
int main()
{
	long int a1, b1;
	cin >> a1 >> b1;
	long int a2 = nozero(a1);
	long int b2 = nozero(b1);
	if (nozero(a1 + b1) == (a2 + b2))
		cout << "YES";
	else
		cout << "NO";
	return 0;

}

#include <iostream>

using namespace std;

int main()
{
    int a, b;
    int ile = 0;
    int ile_0 = 0;

    cin >> a >> b;

    while(a>0)
    {
        if(a%10>5)
            ile++;
        if(a%10==0)
            ile_0++;
        a/=10;
    }

    while(b>0)
    {
        if(b%10>5)
            ile++;
        if(b%10==0)
            ile_0++;
        b/=10;
    }

    if(ile==0 || ile_0==0)
        cout << "YES\n";
    else
        cout << "NO\n";

    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define MOD 1000000007
#define ll long long
#define ull unsigned long long
#define si set <ll>
#define vi vector <ll>
#define mii map <ll,ll>
#define vpi vector <pair <ll,ll> >
#define sz(c) (int)c.size()
#define fr first
#define ll long long
#define fastio ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define sc second
#define pb push_back
#define mp make_pair
#define all(a) (a).begin(),(a).end()
#define rep(i,a,n) for(int i=a ; i<n ; i++)
#define r0 return 0;

ll pow(ll base,ll pow)
{
   ll res=1;
   while(pow)
   {
         if (pow%2!=0)  res=(res*base)%MOD;
         base=(base*base)%MOD;
         pow/=2;
   }
   return res;
}

bool isPrime(int n)
{
    // Corner cases
    if (n <= 1)  return false;
    if (n <= 3)  return true;

    // This is checked so that we can skip
    // middle five numbers in below loop
    if (n%2 == 0 || n%3 == 0) return false;

    for (int i=5; i*i<=n; i=i+6)
        if (n%i == 0 || n%(i+2) == 0)
           return false;

    return true;
}

int isSubstring(string s1, string s2)
{
    int M = s1.length();
    int N = s2.length();
    for (int i = 0; i <= N - M; i++)
    {
        int j;
        for (j = 0; j < M; j++)
            if (s2[i + j] != s1[j])
                break;
        if (j == M)
            return i;
    }

    return -1;
}

int main()
{
    ll a,b,flag=0;
    cin>>a>>b;
    ll p=a;
    ll q=b;
    while(p!=0)
    {
        int x=p%10;
        int y=q%10;
        if(x==0 && y==0)
        flag=1;
        p=p/10;
        q=q/10;
    }
    if(flag==0)
    cout<<"YES"<<"\n";
    else
    {
    while(a!=0)
    {
        int x=a%10;
        int y=b%10;
        a=a/10;
        b=b/10;
        if(x+y>=10)
        {
            cout<<"NO"<<"\n";
            r0;
        }
    }
    cout<<"YES"<<"\n";
    r0;
    }
}

# include<iostream>
# include<sstream>
using namespace std;
int main(){

int x,y,z,z2;
cin>>x>>y;
z=x+y;
string x1,y1,z1;
stringstream s1,s2,s3;
s1<<x;
s1>>x1;
s2<<y;
s2>>y1;
s3<<z;
s3>>z1;

     for(int i=0;i<x1.length();i++){
      if(x1[i]=='0'){x1.erase(i,1);}
      if(y1[i]=='0'){y1.erase(i,1);}
      if(z1[i]=='0'){z1.erase(i,1);}
                                  }
 stringstream ss1(x1),ss2(y1),ss3(z1);
ss1>>x;
ss2>>y;
ss3>>z;

z2=x+y;

if(z2==z)cout<<"YES\n";
else cout<<"NO\n";

return 0;
}

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<ctype.h>
int main()
{
    long long i,j,a,b,c,z;char str[3][11];
    scanf("%lld %lld",&a,&b);
    sprintf(str[0],"%lld",a);
    sprintf(str[1],"%lld",b);
    c=a+b;
   // printf("%lld",c);
    sprintf(str[2],"%lld",c);
    for(i=0;i<3;i++)
    {
     a=strlen(str[i]);
     for(j=0;j<=a;j++)
     {a=strlen(str[i]);
         if(str[i][j]=='0')
      for(z=j;z<=a;z++)
       str[i][z]=str[i][z+1];}
    }
    printf("%d",atoi(str[1])+atoi(str[0]));
    printf("%d",atoi(str[2]));
    if(atoi(str[1])+atoi(str[0])==atoi(str[2]))
    {printf("YES");return 0;}
    printf("NO");
    return 0;
}

#include <bits/stdc++.h>
using namespace std;
#define MAX 1001
// #define long long ll;

bool isSame(long long a, long long b) {

	long long zero = 0;
	bool flag = false;
	if (a <= 9 && b <= 9) {
		if (a + b <= 9) {
			return true;
		} else {
			return false;
		}
	}
	while (a > 0 && b > 0) {
		int digit1 = a % 10;
		int digit2 = b % 10;
		if (digit2 == 0 || digit1 == 0) {
			zero++;
		}
		if (digit2 == 0 && digit1 != 0 || digit2 != 0 && digit1 == 0) {
			return false;
		}
		if (digit1 + digit2 > 9) {
			flag = true;
		}
		a /= 10;
		b /= 10;
	}
	if (flag == true && zero > 0) {
		return false;
	}
	return true;
}
int main() {

#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
	long long a, b;
	cin >> a >> b;

	if (isSame(a, b)) {
		cout << "YES";
	} else {
		cout << "NO";
	}
	return 0;

}

#include <iostream>
#include <vector>
#include <utility>
#include <map>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cmath>
#include <string.h>
#include <climits>
#include <cmath>
#include <set>
#include <stack>
#include <string>
#include <stdlib.h>
#include <sstream>

using namespace std;

int main()
{
	string s1,s2,s3;

	int x,y;
	cin>>x>>y;

	int z = x+y;

	//cin>>s1>>s2;

	stringstream out1,out2,out3;

	out1<<x;

	s1 = out1.str();

	out2<<y;

	s2 = out2.str();

	out3<<z;

	s3 = out3.str();

	string a="",b="",c="";

	for(int i=0; i<s1.size(); i++)
	{
		if(s1[i]!='0')
			a = a + s1[i];

	}

	for(int i=0; i<s2.size(); i++)
	{
		if(s2[i]!='0')
			b = b + s2[i];

	}

	for(int i=0; i<s3.size(); i++)
	{
		if(s3[i]!='0')
			c = c + s3[i];

	}

	//cout<<a<<" "<<b;

	long int n1=0, n2=0, n3 =0;

	for(int i=a.size()-1; i>=0; i--)
	{
		n1 = n1 + (a[i]-48)*pow(10,a.size()-1-i);

	}

	for(int i=b.size()-1; i>=0; i--)
	{
		n2 = n2 + (b[i]-48)*pow(10,b.size()-1-i);

	}

	for(int i=c.size()-1; i>=0; i--)
	{
		n3 = n3 + (c[i]-48)*pow(10,c.size()-1-i);

	}

	//cout<<n1<<" "<<n2<<" "<<n3<<endl;

	if(n1+n2 == n3)
		cout<<"YES"<<endl;
	else
		cout<<"NO"<<endl;

	return 0;
}

#include<iostream>
#include<string>
#include<vector>
#include<sstream>
#include<algorithm>
using namespace std;
int main (){

	string Data1 , Data2 , ans1, ans2;
	cin >> Data1 >> Data2;
	int Hacked1=count(Data1.begin() , Data1.end() , '0') , Hacked2=count(Data2.begin() , Data2.end() , '0');
	if(Hacked1+Hacked2==0)return printf("YES\n") , 0;
	if(Hacked1+Hacked2==1||Data1.size()!=Data2.size())return printf("NO\n") , 0;
	int Attack1=0;
	vector<int>Attack2;
	for(int i=0 ; i<Data1.size() ; i++){Attack1*=10 , Attack1+=(Data1[i]-'0')+(Data2[i]-'0');}
	for(int i=0 ; i<Data2.size() ; i++)if(Data1[i]!='0' && Data2[i]!='0')Attack2.push_back((Data1[i]-'0')+(Data2[i]-'0'));
            ostringstream Test1;
            Test1 << Attack1;
            ans1=Test1.str();
            for(int i=0 ; i<Attack2.size() ; i++){
            	ostringstream Test2;
            	Test2 << Attack2[i];
            	ans2+=Test2.str();

            }
            if(ans1==ans2)return printf("NO\n") , 0;
            else printf("YES\n");
	return 0;
}

#include<iostream>
#include<math.h>
#include<String>
using namespace std ;

 int main () {
    string a , b ,c , A , B , C;
    cin>>a;
    cin>>b;
    c=(atoi(a.c_str())+atoi(b.c_str()))+"";

    //remove 0's from a
    for(int i=0; i < a.length(); i++){
        if(a[i]!='0'){
        A+=a[i];
        }
    }
    for(int i=0; i < b.length(); i++){
        if(b[i]!='0'){
        B+=b[i];
        }
    }
     for(int i=0; i < c.length(); i++){
        if(c[i]!='0'){
        C+=c[i];
        }
    }
    if( atoi(A.c_str())+atoi(B.c_str())==atoi(C.c_str()))
    cout<<"YES"<<endl;
    else
    cout<<"NO"<<endl;

    return 0 ;
}

#include<bits/stdc++.h>
#define fi first
#define fin  freopen("input.txt","r",stdin);
#define fout freopen("output.txt","w",stdout);
#define ll long long
#define pb push_back
#define pf push_front
#define se second
#define sc scanf
#define pr printf
#define time ios_base::sync_with_stdio(0);
using namespace std;
const ll INF = 1e6;
const ll N = 1e5 + 7;
const ll mod = 1e8 ;
const long double eps = 1E-7 ;

int s , t , k ;
int a , b , c ;
vector < int > V , l , r ;
int lnt , cnt , x , y ;
int main ()
{
    cin >> s >> t ;
    x = s , c = t ;
    while ( s > 0 )
    {
        V.pb(s%10) ;
        s/=10 ;
    }
    while ( t > 0 )
    {
        l.pb(t%10) ;
        t/=10 ;
    }
    y = V.size();
    reverse(V.begin(),V.end()) ;
    reverse(l.begin(),l.end()) ;
    for ( int i = 0 ; i < V.size() ; i++ )
    {
        y-- ;
        if ( V[i] != 0 )
            a+=pow(10,y)*V[i] ;
    }
    y = l.size() ;
    for ( int i = 0 ; i < l.size() ; i++ )
    {
        y-- ;
        if ( l[i] != 0 ){
            b+=pow(10,y)*l[i] ;
        }
    }
    V.clear() ;
    l.clear() ;
    cnt=a+b ;
    while ( x > 0 )
    {
        if ( x % 10 != 0 ){
            V.pb(x%10) ;
        }
        x/=10 ;
    }
    while ( c > 0 )
    {
        if ( c % 10 != 0 ){
            l.pb(c%10) ;
        }
        c/=10 ;
    }
    a = 0 ;
    b = 0 ;
    y = V.size();
    reverse(V.begin(),V.end()) ;
    reverse(l.begin(),l.end()) ;
    for ( int i = 0 ; i < V.size() ; i++ )
    {
        y-- ;
        if ( V[i] != 0 )
            a+=pow(10,y)*V[i] ;
    }
    y = l.size() ;
    for ( int i = 0 ; i < l.size() ; i++ )
    {
        y-- ;
        if ( l[i] != 0 ){
            b+=pow(10,y)*l[i] ;
        }
    }
    lnt=a+b ;
    V.clear() ;
    l.clear() ;
    while ( cnt > 0 )
    {
        if ( cnt % 10 != 0 )
            V.pb(cnt%10)  ;
        cnt/=10 ;
    }
    while ( lnt > 0 )
    {
        if ( lnt % 10 != 0 )
            l.pb(lnt%10)  ;
        lnt/=10 ;
    }
    for ( int i = 0 ; i < V.size() ; i++ )
    {
        if ( V[i] != l[i] )
        {
            cout << "NO" ;
            return 0 ;
        }
    }
    cout << "YES" ;
}

#include <iostream>
#include <algorithm>

using namespace std;

int rev (int r)
{
    int j=0;
    while (r)
    {
        j*=10;
        j+=r%10;
        r/=10;

    }
    return j;
}
int NoZeros (int n)
{
    int r=0;
    while (n%10)
    {
        r*=10;
        r+=n%10;
        n/=10;

    }

    rev(r);

    return r;
}

int main()
{
     int a,b;
     cin>>a>>b;

     int c=a+b;

     a=NoZeros(a);
     b=NoZeros(b);

     int y=a+b;

     if (c==y)
        cout<<"YES";

     else
        cout<<"NO";

    return 0;
}

#include <iostream>
#include <string>
#include <algorithm>
#include <map>
#include <set>
#include <stdlib.h>
#include <math.h>
using namespace std;
int main()
{
    string n1, n2;
    long long sum;
    int c1,c2,c3;
    cin >> n1 >> n2;
    sum = atoi(n1.c_str()) + atoi(n2.c_str());
    string _sum = to_string((long double)sum);
    c1 = n1.find("0");
    c2 = n2.find("0");
    c3 = _sum.find("0");
    while (c1 != -1&&c2!=-1&&c3!=-1)
    {
        if (c1!=-1)
        n1.erase(c1, 1);
        c1 = n1.find("0");
        if (c2 != -1)
        n2.erase(c2, 1);
        c2 = n2.find("0");
        if (c3 != -1)
            _sum.erase(c3, 1);
        c3 = _sum.find("0");
    }
    if (atoi(_sum.c_str()) == atoi(n1.c_str()) + atoi(n2.c_str()))
        cout<<"YES"<<endl;
    else
        cout << "NO" << endl;
    return 0;
}

#include<iostream>
using  namespace std;
int a,b,i,g,h,j,k,l,q,w,e,r,t,y,u;
int  main()
{
      cin>>a>>b;
           i=a%10;   a/=10;
           g=b%10;   b/=10;
           h=a%10;   a/=10;
           j=b%10;    b/=10;
           if((i+g>10) || (h+j>10))
           cout<<"NO"<<endl;
           else
           cout<<"YES"<<endl;

       }

#define _CRT_SECURE_NO_WARNINGS
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<map>
#include<unordered_map>
#include<queue>
#include<stack>
#include<iterator>
#include<cmath>
#include<string>
#include<sstream>
#include<cstring>
#include<ctype.h>
#include<iomanip>
#include<bitset>
#include<stdio.h>
#include<fstream>
#include<stdlib.h>
#include<math.h>
#include <numeric>
using namespace std;

#define all(v)         v.begin(),v.end()
#define sz(V)        ((ll)((v).size()))
#define pp(x)               push_back(x)
#define ck(a)               (a<1 || a>9)
#define lop(i,n)    for(ll i=0;i<n;i++)
#define loop(i,f,l) for(ll i=f;i<l;i++)
#define READ(s)   freopen(s, "r", stdin)
#define WRITE(s) freopen(s, "w", stdout)
#define scl(n)          scanf("%lld",&n)
#define sc(n)             scanf("%d",&n)
#define INF                   1000000000
#define PI             3.141592653589793
#define print(v)      lop(i, v.size()) cout<<v[i]<<" ";
#define read(v)   lop(i, v.size()) cin>>v[i];
typedef string            ss;
typedef long long         ll;
typedef pair <ll, ll>   ii;
typedef pair<string, ll> si;
typedef pair<ll, string> is;
typedef pair<char, ll>  chi;
typedef vector<ii>       vii;
typedef vector<ll>       vi;
typedef vector<vi>       vvi;
typedef vector<string>    vs;
typedef vector<ll>       vll;
//READ("input.txt");WRITE("output.txt");
ll gcd(ll a, ll b) { return (b == 0 ? a : gcd(b, a % b)); }
ll lcm(ll a, ll b){ return ((a*b) / gcd(a, b)); }
ll pw(ll b, ll p){ if (!p) return 1; ll sq = pw(b, p / 2); sq *= sq; if (p % 2) sq *= b; return sq; }
ll sd(ll x){ return x<10 ? x : x % 10 + sd(x / 10); }
ll sq(ll x){ lop(i, x)if ((ll)i*i > x) return (i - 1); return ll(1); }

int main()
{
    string a, b;
    cin >> a >> b;
    ll c1 = stoi(a) + stoi(b);
    lop(i, a.size())
        if (a[i] == '0')
            a.erase(i, 1);
    lop(i, b.size())
        if (b[i] == '0')
            b.erase(i, 1);
    string c3 = to_string(c1);
    lop(i, c3.size())
        if (c3[i] == '0')
            c3.erase(i, 1);
    ll c2 = stoi(a) + stoi(b);
    if (stoi(c3) == c2)
        cout << "YES";
    else
        cout << "NO";
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    int a,b,c,d,e;
    cin>>a>>b;
    c=a+b;
    d=c/10;
    if((c%10>0) || (d%10>0)){
                 cout<<"no";
                 }
                 else cout<<"yes";
                 return 0;
                 }

#include<iostream>
using namespace std;
long long delz(long long x)
{
	long long y=0,z=0;
	while(x>0)
	{
	if(x%10)
	y=y*10+(x%10);
	x=x/10;
	while(y>0)
	{
	z=z*10+(y%10);
	y=y/10;
}
	return z;
	}

	}

int main(){

	long long x,y,a,b,q,z;
	cin>>a>>b;
	q=a+b;
	x=delz(a);
	y=delz(b);
	z=delz(q);
	if(z==q)
	cout<<"yes";
	if(x+y==z)
	cout<<"YES";
	else
	cout<<"NO";
		return 0;
}

/////IN THE NAME OF ALLAH, MOST GRACIOUS, MOST MERCIFUL
#include<bits/stdc++.h>
using namespace std;
//long long n,a[100001];string s;
typedef long long ll;
typedef priority_queue<int> pq;
typedef pair<int,int> p;
typedef set<int> s;
ll gcd(ll x, ll y)
{
	if(!x||!y)return x|y;
	if(x%y==0)return y;
	else return gcd(y,x%y);
}
bool isprime(ll x)
{
	if(x%2==0) return 0;
	for(ll i=3;i<=x/i;i=i+2) if(x%i==0) return 0;
	return 1;
}
bool is_lucky(int a)
{
	if(a==0) return 0;
	if(a%10==8)return 1;
	else return is_lucky(a/10);
}
int main()
{
	long long a,b;cin>>a>>b;long long c=a+b;
	while(a||b)
	{
		int x=a%10,y=b%10,z=c%10;a/=10; b/=10;c/=10;
		if(!x and !y and z){cout<<"NO"; return 0;
		}else if(x and !y and !z){cout<<"NO"; return 0;
		}else if(!x and y and !z){cout<<"NO"; return 0;
		}else if(x and y and !z){cout<<"NO"; return 0;
		}else if(x and !y and z){cout<<"NO"; return 0;
		}else if(x and !y and !z){cout<<"NO"; return 0;
		}
	}cout<<"YES";
}

#include <iostream>
#include <string>
#include <cstdlib>
using namespace std;
#define arr 15
char a[arr], b[arr], c[arr], d[arr];
int x, y;
int main()
{
    cin >> a >> b;
    x = atoi(a);
    y = atoi(b);
    int ans1 = x + y;
    int i, j = 0;
    for (i = 0; a[i] != '\0'; i++)
    {
        if (a[i] !='0')
        {
            c[j++] = a[i];
        }
    }
    char str[arr], str1[arr];
    itoa(ans1, str, 10);
    j = 0;
    for (i = 0; str[i] != '\0'; i++)
    {
        if (str[i] !='0')
        {
            str1[j++] = str[i];
        }
    }
    ans1 = atoi(str1);
    j = 0;
    for (i = 0; b[i] != '\0'; i++)
    {
        if (b[i] !='0')
        {
            d[j++] = b[i];
        }
    }
    x = atoi(c);
    y = atoi(d);
    int ans2 = x + y;
    if (ans1 == ans2) cout << "YES" << endl;
    else cout << "NO" << endl;
    //while (1);
    return 0;
}

#include<bits/stdc++.h>
#define fi first
#define fin  freopen("input.txt","r",stdin);
#define fout freopen("output.txt","w",stdout);
#define ll long long
#define pb push_back
#define pf push_front
#define se second
#define sc scanf
#define pr printf
#define time ios_base::sync_with_stdio(0);
using namespace std;
const ll INF = 1e6;
const ll N = 1e5 + 7;
const ll mod = 1e8 ;
const long double eps = 1E-7 ;

int s , t , k ;
int a , b , c ;
vector < int > V , l , r ;
int lnt , cnt , x , y ;
int main ()
{
    cin >> s >> t ;
    x = s , c = t ;
    while ( s > 0 )
    {
        V.pb(s%10) ;
        s/=10 ;
    }
    while ( t > 0 )
    {
        l.pb(t%10) ;
        t/=10 ;
    }
    y = V.size();
    reverse(V.begin(),V.end()) ;
    reverse(l.begin(),l.end()) ;
    for ( int i = 0 ; i < V.size() ; i++ )
    {
        y-- ;
        if ( V[i] != 0 )
            a+=pow(10,y)*V[i] ;
    }
    y = l.size() ;
    for ( int i = 0 ; i < l.size() ; i++ )
    {
        y-- ;
        if ( l[i] != 0 ){
            b+=pow(10,y)*l[i] ;
        }
    }
    V.clear() ;
    l.clear() ;
    cnt=a+b ;
    while ( x > 0 )
    {
        if ( x % 10 != 0 ){
            V.pb(x%10) ;
        }
        x/=10 ;
    }
    while ( c > 0 )
    {
        if ( c % 10 != 0 ){
            l.pb(c%10) ;
        }
        c/=10 ;
    }
    a = 0 ;
    b = 0 ;
    y = V.size();
    reverse(V.begin(),V.end()) ;
    reverse(l.begin(),l.end()) ;
    for ( int i = 0 ; i < V.size() ; i++ )
    {
        y-- ;
        if ( V[i] != 0 )
            a+=pow(10,y)*V[i] ;
    }
    y = l.size() ;
    for ( int i = 0 ; i < l.size() ; i++ )
    {
        y-- ;
        if ( l[i] != 0 ){
            b+=pow(10,y)*l[i] ;
        }
    }
    lnt=a+b ;
    while ( cnt > 0 )
    {
       if  ( cnt % 10 != 0 and lnt%10 !=0 ){
         if ( cnt % 10 != lnt % 10 ){
           cout << "NO" ;
              return 0 ;
            }
       }
        cnt/=10 ; lnt/=10 ;
    }
     cout << "YES" ;
}

#include <bits/stdc++.h>
using namespace std;

vector<vector<int> > adjList;
vector<int> dfsnum;
int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	string s1, s2;
	cin >> s1 >> s2;

	reverse(s1.begin(), s1.end());
	reverse(s2.begin(), s2.end());

	for(int i = 0; i < min(s1.length(), s2.length()); i++)
	{
		if(s1[i] == '0' && s2[i] != '0' || s1[i] != '0' && s2[i]== '0')
		{
			cout << "NO" << endl;
			return 0;
		}
		else if(s1[i]+s2[i]-(2*48) >9 )
		{
			if(i < s1.length() && s1[i+1] == '0')
			{
				cout << "NO" << endl;
				return 0;
			}
			if(i < s2.length() && s2[i+1] == '0')
			{
				cout << "NO" << endl;
				return 0;
			}
		}
	}
	for(int i = min(s1.length(), s2.length()); i < max(s1.length(), s2.length()); i++)
	{
		if(i < s1.length() && s1[i] == '0')
		{
			cout << "NO" << endl;
			return 0;
		}
		if(i < s2.length() && s2[i] == '0')
		{
			cout << "NO" << endl;
			return 0;
		}
	}
	cout << "YES" << endl;
	return 0;
}

#include<iostream>
#include<vector>
using namespace std;

vector<int> noDigit(long x){
    vector<int> v;
    while(x > 0){
        v.push_back(x % 10);
        x = x / 10;
    }
    return v;
}

int main()
{
    long a, b;
    cin>>a>>b;
    vector<int> A;
    vector<int> B;
    A = noDigit(a);
    B = noDigit(b);
    int smlen = (A.size() < B.size()) ? A.size() : B.size();
    for(int i = 0; i < smlen; i++){
        if((A[i] != 0 && B[i] == 0) || (A[i] == 0 && B[i] != 0)){
            cout<<"NO"<<endl;
            return 0;
        }
    }
    cout<<"YES"<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define ll long long
int solve(ll n)
{
	ll newn =0;
	while(n != 0)
	{
		ll rem = n%10;
		if(rem!=0)
		newn = newn*10 + rem;
		n = n/10;

	}
	return newn;
}

int main()
{
	ll a,b,c;
	cin>>a>>b;
	c= a+b;
	//cout<<c<<endl;
	a = solve(a);
    a = solve(a);
	b = solve(b);
    c = solve(c);
    b = solve(b);
    c = solve(c);

    //cout<<a<<" "<<" "<<b<<" "<<c<<endl;
	if(c == a+b)
	{
		cout<<"YES"<<endl;
	}
	else
	{
		cout<<"NO"<<endl;
	}

}

#include <cstdlib>
#include <iostream>
#include <string>

using namespace std;

int woz(int n){
    int result=0,t=1;
    while(n){
          if(n%10){
                result += t*(n%10);
                t *= 10;
    }
    n /= 10;
}
    return result;
}

int main()
{
    int a,b,c;
    c = a + b;
    cin >> a >> b;
    cout << (woz(c) == woz(a) + woz(b) ? "YES" : "NO") << endl;
}

#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
    unsigned long long num1 , num2 , answer;
    string numone , numtwo ,Answer;
    stringstream x , y , z;
    stringstream a , b , c;

    cin >> num1 >> num2 ;
    answer=num1+num2;

    x << num1;
    y << num2;
    z << answer;

    x >> numone ;
    y >> numtwo ;
    z >> Answer ;

    for(int i=0 ; i<numone.length() ; i++){
    if(numone[i]=='0'){
    numone.erase(numone.begin()+i);
    }
    }

    for(int j=0 ; j<numtwo.length() ; j++){
    if(numtwo[j]=='0'){
    numtwo.erase(numtwo.begin()+j);
    }
    }

    for(int k=0 ; k<Answer.length() ; k++){
    if(Answer[k]=='0'){
    Answer.erase(Answer.begin()+k);
    }
    }

    a << numone;
    b << numtwo;
    c << Answer;

    a >> num1;
    b >> num2;
    c >> answer;

    if (num1+num2==answer)
    cout << "YES" << endl;

    if(num1+num2!=answer)
    cout << "NO" << endl;

    return 0;
}

#include<bits/stdc++.h>
using namespace std;

#define int long long int
#define double long double
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define rep(i,a,b) for (int i=a; i<b; ++i)
#define dbg(x) { cerr<<#x<<": "<<x<< endl; }
#define dbg2(x,y) { cerr<<#x<<": "<<x<<" , "<<#y<<": "<<y<<endl; }
#define dbg3(x,y,z) { cerr<<#x<<": "<<x<<" , "<<#y<<": "<<y<<" , "<<#z<<": "<<z<<endl; }
#define IOS ios::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#ifndef LOCAL
#define endl '\n'
#endif
const int inf = INT_MAX;
const double eps = 0.0000001;
const double PI = acos(-1.0);
const int MOD = 1e9+7;
const int N  = 5e5+5;

signed main(){
    #ifdef LOCAL
        freopen("input.txt", "r", stdin);
        //freopen("output.txt", "w", stdout);
    #endif
    IOS;

    string a, b;
    cin >> a >> b;
    if(a.length()!=b.length()) cout << "NO";
    else {
        for (int i = 0; i < a.length(); ++i)
        {
            if((a[i]=='0' && b[i]!='0') || (a[i]!='0' && b[i]=='0'))
                return cout << "NO",0;
        }
        for (int i = a.length()-1; i>=1; i--) {
            if(a[i-1]=='0') {
                if(a[i]+b[i]-2*'0' >9) return cout << "NO",0;
            }
        }
    }
    cout << "YES";
    return 0;
}

#include<iostream>
using namespace std;
int main()
{
    int a,b,c,d;
    cin>>a>>b;
    c=a+b;
    while(d>10){
               d=c/10;
               }
               if((c%10==0) || (d%10==0)){
                            cout<<"YES";
                            }
                            else cout<<"NO";
return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a , b;
    cin >> a >> b;
    int carry = 0;
    while(a != 0 && b != 0){
        if((a % 10) + (b % 10) == 0){
            if(carry != 0){
                break;
            }
        }
        carry = (a % 10) + (b % 10);
        a /= 10;
        b /= 10;
    }
    if(a == 0 || b == 0){
        cout << "YES\n";
    }else{
        cout << "NO\n";
    }
    return 0;
}

#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iostream>
long long remove(long long k)
{
    long long v[100];
    long long x;
    for(long long i=0;i<=15;++i)
        v[i]=0;
    while(k!=0)
    {
        x=k%10;
        if(x)
        {
            v[++v[0]]=x;
        }
        k=k/10;
    }
    long long rez=0;
    for(int i=v[0];i>=1;--i)
    { //  printf("%d",v[i]);
        rez=rez*10;
        rez=rez+v[i];
    }
    //printf("\n");
    //printf("%lld\n",rez);

    return rez;
}
using namespace std;
int main()
{long long a,b,c;
    scanf("%lld%lld",&a,&b);
   // printf("%lld %lld\n%lld %lld",a,b,remove(a),remove(b));
    c=a+b;
    long long a1=remove(a);
    long long b1=remove(b);
    long long c1=remove(c);
  //  printf("%lld %lld %lld \n%lld %lld %lld %lld\n",a,b,c,a1,b1,c1,a1+b1);
    if(c1==a1+b1)
       printf("YES");
    else printf("NO");
    return 0;
}

#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int change (int n)
{
   int i=0;
    int  res=0;
    while(n!=0)
    {
       if(n%10==0)
     {
       n=n/10;  continue;
     }
 cout<<"the number which added now is:"<<(n%10)*pow(10,i)<<endl;
         res+=(n%10)*pow(10,i);
        cout<<res<<endl;
        n/=10;
        i++;
    }
        // cout<<res<<endl;

    return res;
}

int main()
{
    int  a,b,c;
    cin>>a>>b;
    c=a+b;
    int first,sec,res;
    first=change(a);
    sec =change(b);
    res =change(c);
    //  cout<<first<<" "<<sec<<" "<<res<<" ";
   cout<<(first+1+sec+1==res?"YES":"NO")<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define li  long long int
#define endl "\n"
#define MOD 1000000007
#define MIN(x,y) ((x<y)?x:y)
#define MAX(x,y) ((x>y)?x:y)
#define gcd  __gcd
#define pb push_back
#define INF (int)1e9
#define EPS 1e-9
#define ERASE(str,index) str.erase(str.begin()+index)
#define pi 2*acos(0.0)
#define SORTV(v,n) sort(v.begin(),v.end()); //sort vector
#define SORTA(arr,n) sort(arr,arr+n); //sort array
#define uli unsigned long long int

void Solve() {
	li a,b;
	cin>>a>>b;
	li res=a+b;
	string str=to_string(res);
	int count=0;
	for(int i=0;i<str.length();i++){
		if(str[i]=='0'){
			count++;
		}

	}
	if(count>0)
		cout<<"YES";
	else
		cout<<"NO";
}
int main() {
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output1.txt", "w", stdout);
#endif

	// li T ;
	// cin >> T;

	// while (T--) {

		Solve();

	// }
	return 0;
}

#include <iostream>
using namespace std;

int main()
{
    long A,B;
    int a,b;
    bool k = false;
    cin >>A>>B;
    while ( A != 0 &B != 0)
    {
        a = A%10;
        b = B%10;
        A /= 10;
        B /= 10;
        int sum;
        if ( a != 0 &&  b!= 0)
        {
            if ( k )
            {
                sum = a + b + 1;
            }
            else
            {
                sum = a + b;
            }

            if ( sum >= 10 )
            {
                k = true;
            }
            else
            {
                k = false;
            }
        }
        else if ( a == 0 && b != 0 || a != 0 && b == 0 || a == 0 && b == 0 && k || sum % 10 == 0)
        {
            cout<<"NO";
            return 0;
        }
    }
    cout<<"YES";
    return 0;
}

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <vector>
#include <map>
#include <cmath>
#include <algorithm>
#include <cstring>

using namespace std;

int main(){
	string str1,str2;
	string::iterator iter1,iter2;
	bool flag=false,check=false;
	cin>>str1>>str2;
	iter2=str2.begin();
	for(iter1=str1.begin();iter1!=str1.end();iter1++){
		if(check){
			if(*iter1+*iter2-96>=10) flag=true;
		}
		if(*iter1=='0'||*iter2=='0'){
			if(*iter1==*iter2)check=true;
			else flag=true;
		}
	}
	if(flag)cout<<"YES"<<endl;
	else cout<<"NO"<<endl;
	return 0;
}

#include <iostream>
#include <cmath>

using namespace std;

int main ()
{
    long long a,b,c,mod;
    long long x=0,y=0,z=0;
    int i=0;
    cin >> a >> b;
    c=a+b;
    while(a>0)
    {
        mod=a%10;
        a/=10;
        if(mod==0)
        {
            i--;
        }
        x+=mod*pow(10,i);
        i++;
    }
    i=0;
    while(b>0)
    {
        mod=b%10;
        b/=10;
        if(mod==0)
        {
            i--;
        }
        //cout << i << endl;
        //cout << "y: " << mod*pow(10,i) << endl;
        y+=mod*pow(10,i);
        i++;
    }
    i=0;
    while(c>0)
    {
        mod=c%10;
        c/=10;
        if(mod==0)
        {
            i--;
        }
        //cout << mod*pow(10,i) << endl;
        z+=mod*pow(10,i);
        i++;
    }
    //cout << x+y << endl;
    if(x+y==z)
    {
        cout << "YES" << endl;
    }
    else
    {
        cout << "NO" << endl;
    }
    return 0;
}

#include<iostream>
#include<cstdio>
#include<string.h>
using namespace std;
long long shrink(long long x)
{
    char s[12];
    char sans[12]="\0";
    long long ans;
    int i=0,j=0;
    sprintf(s,"%I64d",x);
    for(i=0;i<strlen(s);i++)
    if(s[i]!='0'){sans[j]=s[i];j++;}
    sscanf(s,"%I64d",&sans);
    return ans;
}
int main()
{
    long long a,b,c;
    cin>>a>>b;
    c=a+b;
    if(shrink(a)+shrink(b)==shrink(c))
    puts("YES");
    else puts("NO");
    return 0;
}

#include <iostream>
using namespace std;
int abc(int a)
{
int num=0;
for(int i=a;i>0;i/=10)
{
int c=i%10;
if(c!=0)
num=num*10+c;
}
return num;
}
int rev(int n)
{
int num=0;
for(int i=n;i>0;i/=10)
{
int c=i%10;
num=num*10+c;
}
return num;
}

int main()
{
int a,b;
cin>>a>>b;
int z=a+b;
int z1=abc(z);
int z2=rev(1);
int a1=abc(a);
int a2=rev(a1);
int b1=abc(b);
int b2=(b1);
int y=b2+a2;
if(z2==y)
cout<<"YES";
else
cout<<"NO";
return 0;
}

#include <bits/stdc++.h>
using namespace std;

vector<vector<int> > adjList;
vector<int> dfsnum;
int main()
{
	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	ios_base::sync_with_stdio(false);
	cin.tie(0);

	string s1, s2;
	cin >> s1 >> s2;

	reverse(s1.begin(), s1.end());
	reverse(s2.begin(), s2.end());

	for(int i = 0; i < min(s1.length(), s2.length()); i++)
	{
		if(s1[i] == '0' && s2[i] != '0' || s1[i] != '0' && s2[i]== '0')
		{
			cout << "NO" << endl;
			return 0;
		}
		else if(s1[i]+s2[i]-(2*48) >9 )
		{
			if(i < s1.length() && s1[i+1] == '0' || i < s2.length() && s2[i+1] == '0' || i > s1.length() && i > s2.length())
			{
				cout << "NO" << endl;
				return 0;
			}
		}
	}
	cout << "YES" << endl;
	return 0;
}

#include<iostream>
using namespace std;

int main(){
	long long int a,b;
	cin >> a >> b;
	int carry = 0;
	bool flag = false;
	while(a > 0 && b > 0){
		int a1 = a%10;
		int b1 = b%10;
		if((a1 == 0 || b1== 0) && carry == 1)
			flag = true;
		carry = (a1+b1)/10;
		a = a/10;
		b = b/10;
	}
	if(flag)
		cout << "NO" << endl;
	else
		cout << "YES" << endl;
	return 0;
}

#include<stdio.h>
#include<algorithm>
#include<vector>
#include<iostream>
long long remove(long long k)
{
    long long v[100];
    long long x;
    for(long long i=0;i<=15;++i)
        v[i]=0;
    while(k!=0)
    {
        x=k%10;
        if(x)
        {
            v[++v[0]]=x;
        }
        k=k/10;
    }
    long long rez=0;
    for(int i=v[0];i>=1;--i)
    { //  printf("%d",v[i]);
        rez=rez*10;
        rez+=v[i];
    }
    //printf("\n");
    //printf("%lld\n",rez);

    return rez;
}
using namespace std;
int main()
{long long a,b,c;
    scanf("%lld%lld",&a,&b);
   // printf("%lld %lld\n%lld %lld",a,b,remove(a),remove(b));
    c=a+b;
    long long a1=remove(a);
    long long b1=remove(b);
    long long c1=remove(c);
  //  printf("%lld %lld %lld \n%lld %lld %lld %lld\n",a,b,c,a1,b1,c1,a1+b1);
    if(c1==a1+b1)
       printf("YES\n");
    else printf("NO\n");
    return 0;
}

#include <cstdlib>
#include <iostream>
#include <string>
#include <sstream>
#include <conio.h>

using namespace std;

int main(int argc, char *argv[])
{
    string::iterator it;
    stringstream ss;
    string str,str1,str2;
    int num1,num2,num3,num11,num22,num33,p;
    cin>>str1>>str2;
    num1 = atoi(str1.c_str());
    num2 = atoi(str2.c_str());
    num3 = num1 + num2;
    ss<<num3;
    ss>>str;
    for (int i=0;i<str.size();i++){
        p=str.find('0');
        if (p<0){break;}
        it=str.begin()+p;
           str.erase(it);}

        num3 = atoi(str.c_str());
    for (int i=0;i<str1.size();i++){
        p=str1.find('0');
        if (p<0){break;}
        it=str1.begin()+p;
           str1.erase(it);}

    for (int i=0;i<str2.size();i++){
        p=str2.find('0');
        if (p<0){break;}
        it=str2.begin()+p;
           str2.erase(it);}

        num11 = atoi(str1.c_str());
        num22 = atoi(str2.c_str());
        num33 = num11 + num22;
        if (num33==num3){cout<<"YES"<<endl;}

        else {cout<<"NO"<<endl;}

    return EXIT_SUCCESS;
}

#include <iostream>
#include <cmath>
using namespace std;

int digito(int n,int indice){
	int mult = pow(10,indice+1);
	int num = (n%mult) - (n%(mult/10));
	return (num/pow(10,indice));
}

int cantidad_digitos(int Num){
	int x=0;
		while(Num!=0){
			Num=Num/10;
			x=x+1;
		}
	return x;
}

bool saca_ceros(int a,int b,int c){
	int a_aux=0,b_aux=0,c_aux=0,j=0;
	int cantdig_a = cantidad_digitos(a);
	int cantdig_b = cantidad_digitos(b);
	int cantdig_c = cantidad_digitos(c);
	for(int i=0;i<cantdig_a;i++){
		if(digito(a,i)!=0){
			a_aux+=digito(a,i)*pow(10,j);
			j++;
		}
	}
	j=0;
	for(int i=0;i<cantdig_b;i++){
		if(digito(b,i)!=0){
			b_aux+=digito(b,i)*pow(10,j);
			j++;
		}
	}
	j=0;
	for(int i=0;i<cantdig_c;i++){
		if(digito(c,i)!=0){
			c_aux+=digito(c,i)*pow(10,j);
			j++;
		}
	}
	cout<<a_aux<<endl<<b_aux<<endl<<c_aux<<endl;
	if((a_aux+b_aux)==c_aux)
		return true;
	return false;
}

int main(int argc, char *argv[]) {
	int a,b,c;
	cin>>a>>b;
	c=a+b;

	if(saca_ceros(a,b,c))
		cout<<"YES";
	else
		cout<<"NO";
	return 0;
}

#include<bits/stdc++.h>
using namespace std;
int main(){
    int a , b;
    cin >> a >> b;
    while(a != 0 && b != 0){
        if((a % 10) + (b % 10) >= 10){
            break;
        }
        a /= 10;
        b /= 10;
    }
    if(a == 0 || b == 0){
        cout << "YES\n";
    }else{
        cout << "NO\n";
    }
    return 0;
}

#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <utility>
#include <cstdlib>
#include <cmath>
#include <iomanip>
#include <set>
#include <numeric>

int main () {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    std::cout.tie(nullptr);
    //freopen("input.txt", "r", stdin);
    //freopen("output.txt", "w", stdout);
    std::vector<int> v(3);
    std::cin >> v[0] >> v[1];
    v[2] = v[0] + v[1];
    auto RemoveZeros = [](std::string s) {
        auto it = s.find('0');
        while (it != std::string::npos) {
            s.erase(it, 1);
            it = s.find(it, '0');
        }
        s.erase(s.find('0'), 1);
    };
    for (int i = 0; i < 3; ++i) {
        std::string s = std::to_string(v[i]);

        v[i] = std::stoi(s);
    }
    std::cout << (v[2] == v[0] + v[1] ? "YES" : "NO");
    return 0;
}

#include <iostream>
#include <string>
#include <string.h>
#include <sstream>
using namespace std;
int main(){
    long long a,b;
    cin>>a>>b;
    long long sum=a+b;
    string s,s1,s2;
    stringstream ss;
    ss<<a , ss>>s;
    ss.clear();
    ss<<b,ss>>s1;
cout<<sum<<endl;
    for (int i = 0; i < s.size(); i++)
    {
        if(s[i]=='0')
            s.erase(s.begin()+i) , i--;
    }
    for (int i = 0; i < s1.size(); i++)
    {
        if(s1[i]=='0')
            s1.erase(s1.begin()+i),i--;
    }
    ss.clear();
    ss<<sum,ss>>s2;
    for (int i = 0; i < s2.size(); i++)
    {
        if(s2[i]=='0')
            s2.erase(s2.begin()+i),i--;
    }
    ss.clear(); ss<<s , ss>>a;
    ss.clear(); ss<<s1 , ss>>b;
    ss.clear(); ss<<s2 , ss>>sum;
cout<<a+b<<endl;
    if(a+b==sum)
        cout<<"YES\n";
    else
        cout<<"NO\n";
}

#include<iostream>
#include<vector>
#include<cstdlib>

using namespace std;

int main()
{
	long a, b;
	cin>>a>>b;
	long c = a + b;
	vector<int>v1(10,-1);
	vector<int>v2(10,-1);
	vector<int>v3(10,-1);
	int i = 0;
	while(a > 0){
		v1[i] = a % 10;
		i++;
		a = a / 10;
	}
	i = 0;
	while(b > 0){
		v2[i] = b % 10;
		i++;
		b = b / 10;
	}
	i = 0;
	while(c > 0){
		v3[i] = c % 10;
		i++;
		c = c / 10;
	}
	bool ans = true;
	for(int i = 0; i < 10; i++){
		if(v1[i] == 0){
			if(v2[i] == 0){
				if(v3[i] == 0){
					continue;
				}
				else{
					cout<<"NO"<<endl;
					exit(0);
				}
			}else{
				cout<<"NO"<<endl;
				exit(0);
			}
		}
	}
	cout<<"YES";
	return 0;
}

#include<bits/stdc++.h>

using namespace std;

int update(int a)
{
         int c=0;
          while(a!=0)
           {
                    if(a%10!=0)
                      c=c*10+a%10;

                     a=a/10;

           }

     return c;

}

int main()
{
         int a , b , i;
         cin>>a>>b;
         int c=a+b;
          a=update(a);
          b=update(b);
          c=update(c);
         if(c==(a+b))
           cout<<"yes";
         else
           cout<<"no";

}

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
#define pb push_back
#define pf printf
#define sf scanf

int main()
{
    string s,a;
    int i;
    cin>>s>>a;

    for(i=0; i<s.size(); i++)
    {
        int x=(s[i]-'0')+(a[i]-'0');

        if(x>=10)
        {
            cout<<"NO\n";
            return 0;
        }
    }
    cout<<"YES\n";

    return 0;
}

#include <iostream>
#include<cstring>
using namespace std;

int main()
{
    char a[10],b[10];
    int fla=0,alpa=0;
    cin>>a>>b;
    for(int i=0;i<strlen(a);i++){
        if(a[i]=='0'&&b[i]=='0'){alpa=1;}
    }
    if(alpa==1){
    for(int i=0;i<strlen(a);i++){
        if(a[i]+b[i]-'0'-'0'>9){fla=1;}
    }
    if(fla==1){cout<<"NO";}
    else{cout<<"YES";}
    return 0;
    }
    else{cout<<"YES";}
}

#include <iostream>
#include <sstream>
#include <math.h>
using namespace std;

int main()
{
    int x,y,t;
    cin>>x>>y;
    t=x+y;
    string s;
    stringstream  ss;
    ss<<t;
    s = ss.str();
    for(int i=0;i<s.size();i++)
    {
        if(s[i]=='0')
        s.erase(i,1);
    }
    string s2="";
    stringstream  sss;
    sss<<x;
    s2 = sss.str();

     string s3="";
    stringstream  ssss;
    ssss<<y;
    s3 = ssss.str();

    for(int i=0;i<s2.size();i++)
    {
        if(s2[i]=='0')
        s2.erase(i,1);
    }
    for(int i=0;i<s3.size();i++)
    {
        if(s3[i]=='0')
        s3.erase(i,1);
    }
    int a=s2.size()-1;
    int b=0;
    for(int i=0;i<s2.size();i++)
    {
        b=b+((int(s2[i]-48))*pow(10,a));
        a--;
    }

    int p=s3.size()-1;
    double c=0.0;
    for(int i=0;i<s3.size();i++)
    {
        c=c+((int(s3[i]-48))*pow(10,p));
        p--;
    }
    int f=b+c;
    string t2;
    stringstream  strn;
    strn<<f;
    t2=strn.str();
    if(s==t2)
    cout<<"YES";
    else
    cout<<"NO";
    return 0;
}

#include<iostream>
#include<string>
#include<sstream>
using namespace std;

int main()
{
    int a=0 , b=0 , sum=0 ;
    string x,y,t,i;
    cin>>x>>y;

    t=x[2];
    i=y[2];
    stringstream zz(t);
    zz>>a;
    stringstream oo(i);
    oo>>b;
    sum=a+b;
    if (sum<=9){
        cout<<"YES";
    }
    else {
        cout<<"NO";
    }

}

#include <iostream>
#include <cstdlib>
#include <cstdio>
#include <algorithm>
#include <string.h>

using namespace std;

int main()
{
    int i,j;
    unsigned int a,b,c;
    char A[11],B[11],C[11];
    cin >> a >> b;
    c = a+b;
    sprintf(A,"%d",a);
    sprintf(B,"%d",b);
    sprintf(C,"%d",c);
    a = b = 0;
    j = 0;
    for(i = 0; i < strlen(A);i++)
        if ( A[i]!='0' ) A[j++]=A[i];
    j = 0;
    for(i = 0; i < strlen(B);i++)
        if ( B[i]!='0' ) B[j++]=B[i];
    j = 0;
    for(i = 0; i < strlen(C);i++)
        if ( C[i]!='0' ) C[j++]=C[i];
    puts(atoi(A)+atoi(B)==atoi(C) ? "YES" : "NO" );
    return 0;
}

#include <iostream>
#include <string>

using namespace std;

string IntToStr(long a)
{
    string str;
    while(a)
    {
        str=char(a%10+'0')+str;
        a/=10;
    }
    return str;
}

int StrToInt(string str)
{
    long r=0,i,n=str.length();
    for(i=0;i<n;i++)
        r=r*10+str[i]-'0';
    return r;
}

void delnull(string &str)
{
    int i;
    for(i=0;i<str.length();i++)
        if(str[i]=='0')
            str.erase(i,1);
}

int main()
{
    string s1,s2,res;
    long l1,l2,r;
    cin >> s1 >> s2;
    l1=StrToInt(s1);
    l2=StrToInt(s2);
    r=l1+l2;
    res=IntToStr(r);
    delnull(s1);
    delnull(s2);
    delnull(res);
    l1=StrToInt(s1);
    l2=StrToInt(s2);
    r=StrToInt(res);
    if(l1+l2==r)
        cout << "YES" << endl;
    else
        cout << "NO" << endl;
    return 0;
}

#include <bits/stdc++.h>
#define LL "%I64d"
#define pb push_back
#define pp pop_back
#define ll long long
#define pll pair<ll, ll>
#define pii pair<int, int>
#define vi vector<int>
#define vs vector<string>
#define vl vector<ll>
#define mp make_pair
#define all(v) v.begin(),v.end()
#define all(s) s.begin(),s.end()
#define ff first
#define ss second
#define endl "\n"
#define sz size()
#define r0 return 0
#define mi map<int>
#define ms map<string>
#define ml map<ll>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define F0R(i,a) FOR(i,0,a)
#define ROF(i,b,a) for (int i=(b)-1;i>=(a);i--)
#define FORS(it,a,b) for(set<int>::iterator it=a;it!=b;it++)
#define all_sum(a,b,i) accumulate((a),(b),i)
using namespace std;
void adskiy_razgon(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
const int mxN=1e+9+7;
const ll INF=1e+18+7;
int nod(int a, int b) {
   if(a==0||b==0){
   	return 0;
   }
   else if(a==b){
   		return a;
   }
   else if (a>b){
   		return nod(a-b,b);
   }
   else{
   		return nod(a,b-a);
   }
}
int nok(int a,int b){
	return a*b/nod(a,b);
}
void sp(int a,double b){
	cout<<fixed<<setprecision(a)<<b;
}
void solve(){
	string a, b;
	cin >> a >> b;
	bool ok = 1, yes = 0;
	for(int i = 0; i < a.sz; ++i) {
		if(a[i] == '0' || b[i] == '0') {
			yes = 1;
			break;
		}
	}
	if(!yes) {
		cout << "YES";
		return;
	}
	for(int i = 0; i < a.sz; ++i) {
		int n = a[i] - '0';
		int m = b[i] - '0';
		if((n + m) >= 10) {
			ok = 0;
			break;
		}
	}
	cout << (ok == 0 ? "NO" : "YES");
}
int main(){
	adskiy_razgon();
	ll t=1;
	//cin>>t;
	for(int i = 1; i <= t; ++i) {
		//cout<<"Case #"<<i<<": ";
		solve();
	}
	r0;
}

#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;

int rev(int n)
{
    int nn=0;
    while(n)
    {
        nn*=10;
        nn+=(n%10);
        n/=10;
    }
    return nn;
}

int main()
{
    int a,b,c,aa,bb,cc,a1,b1,c1;
    scanf("%d%d",&a,&b);
    c=a+b;
    a1=a;b1=b;c1=c;
    aa=bb=cc=0;
    while(a1)
    {
        if(a1%10==0)a1/=10;
        else
        {
            aa*=10;
            aa+=(a1%10);
            a1/=10;
        }
    }
    aa=rev(aa);
    while(b1)
    {
        if(b1%10==0)b1/=10;
        else
        {
            bb*=10;
            bb+=(b1%10);
            b1/=10;
        }
    }
    bb=rev(bb);
    while(c1)
    {
        if(c1%10==0)c1/=10;
        else
        {
            cc*=10;
            cc+=(c1%10);
            c1/=10;
        }
    }
    cc=rev(cc);
    //cout<<aa<<' '<<bb<<' '<<cc<<endl;
    if(aa+bb==cc)printf("YES\n");
    else printf("NO\n");
    //while(1);
    return 0;
}

#include <iostream>
#include <string>
using namespace std;

long long gen(string _char){
    long long result = 0;
    for (int i=0; i<_char.size(); i++)
        result += _char[i] - '0';
    return result;
}

int main() {
    long long a, b, c, newc;
    cin>>a>>b;

    c = gen(to_string(a)) + gen(to_string(b));
    newc = a + b;

    if (gen(to_string(newc)) == c)
        cout<<"YES"<<endl;
    else
        cout<<"NO"<<endl;

    return 0;
}

#include <stdio.h>
#include <string.h>
int main ()
{
    long long  a,b,c,d,flag;
    char arr[100];
    while(scanf("%I64d%I64d",&a,&b)!=EOF)
    {
        flag=0;
        c=a+b;
        while(c)
        {
            d=c%10;
            c=c/10;
            if(d==0)
            {
                flag=1;

                break;
            }

        }
        if(flag==0)
        {
            printf("NO\n");
        }
        else
        {
            printf("YES\n");
        }
    }

    return 0;
}
//2018-11-20 16:30:13.961

#include<iostream>
#include<cstdio>
#include<map>
#include<vector>
#include<set>
#include<cstring>
#include<string>
#include<algorithm>
#include<queue>
#include<cmath>
using namespace std;
typedef pair<int,int> ii;
typedef pair<string,int> si;
typedef pair<int,ii > iii;
typedef pair<si,ii > siii;

 int main(){
     string s1,s2;
     cin>>s1>>s2;
     bool res=true;
     string bgst,smst;
     if(s1>s2)
         bgst=s1,smst=s2;
     else bgst=s2,smst=s1;;

    int j=bgst.size()-smst.size()+2;
    if(j>2&&bgst[j-3]=='0')
    {
        if(bgst[j-2]>='5'&&smst[0]>='5')
            res=0;
    }
     for(long long i=2;(i<smst.size())&&res;i++)
     {
        if((bgst[j-1]=='0'||smst[j-1]=='0')&&bgst[j-1]!=smst[j-1])
        {
            res=false;
        }
        else
            if(bgst[j-1]=='0'&&smst[j-1]=='0')
            {
                if(bgst[j]>='5'&&smst[i]>='5')
                    res=0;
            }
        else if((bgst[j]=='0'||smst[j]=='0')&&bgst[j]!=smst[j])
        {
            res=false;
        }
            j++;
     }
     if(res)
        printf("YES\n");
     else printf("NO\n");
    return 0;
}

/////IN THE NAME OF ALLAH, MOST GRACIOUS, MOST MERCIFUL
#include<bits/stdc++.h>
using namespace std;
//long long n,a[100001];string s;
typedef long long ll;
typedef priority_queue<int> pq;
typedef pair<int,int> p;
typedef set<int> s;
ll gcd(ll x, ll y)
{
	if(!x||!y)return x|y;
	if(x%y==0)return y;
	else return gcd(y,x%y);
}
bool isprime(ll x)
{
	if(x%2==0) return 0;
	for(ll i=3;i<=x/i;i=i+2) if(x%i==0) return 0;
	return 1;
}
bool is_lucky(int a)
{
	if(a==0) return 0;
	if(a%10==8)return 1;
	else return is_lucky(a/10);
}
int main()
{
	long long a,b;cin>>a>>b;long long c=a+b;
	while(a||b)
	{
		int x=a%10,y=b%10,z=c%10;a/=10; b/=10;c/=10;
		if(!x and !y and z){cout<<"NO"; return 0;
		}else if(x and !y and !z){cout<<"NO"; return 0;
		}else if(x and !y and !z){cout<<"NO"; return 0;
		}
	}cout<<"YES";
}

#include <iostream>

using namespace std;

void removeZeros(long long &x) {
    long long z = x;
    long long y = 0;
    int step = 1;

    while (z>0) {
        if (z % 10 != 0) {
            y = (z%10)*step + y;
            step *= 10;
        }
        z = z/10;
    }
    x = y;
}

int main() {
    long long m,n,sum;

    cin >> m >> n;
    sum = m + n;

    removeZeros(m);
    removeZeros(n);
    removeZeros(sum);

    cout << m << " " << n << " " << sum;

    if (m + n == sum)
        cout << "YES";
    else cout << "NO";

    return 0;
}

#include<iostream>
using namespace std;

int raz(int a)
{
	if(a%10==0)
		a/=10;
	int vb=a%10;
	if((a/10)%10==0)
		a=a/100+vb;
	return a;

}

int main ()
{

	//freopen("input.txt", "r", stdin);
	//freopen("output.txt", "w", stdout);
	int n,m;
	cin >> n >> m;
	int c=n+m;
	n=raz(n);
	m=raz(m);
	int c1=raz(c);
	if(n+m==c1)
		cout << "YES";
	else
		cout << "NO";
	return 0;
}

#include<iostream>
#include<cstdlib>
#include<cstring>
using namespace std;
main()
{
      char str[100],str1[100],ar[1000],ar1[1000],ari[1000];
      int i,j,k,m=0,d=0,sum=0,s=0;

      gets(str);
      gets(str1);
      int z=atoi(str);
      int q=atoi(str1);
      sum=z+q;
      string stri = to_string(sum);
      for(k=0;k<strlen(str);k++)
      {
           if(stri[k]!='0')
           {
                ari[s]=stri[k];
                s++;
           }
      }
      int w=atoi(ari);

      for(i=0;i<strlen(str);i++)
      {
           if(str[i]!='0')
           {
                ar[m]=str[i];
                m++;
           }
      }
      for(j=0;j<strlen(str1);j++)
      {
           if(str1[j]!='0')
           {
                ar1[d]=str1[j];
                d++;
           }
      }
      int r,e,v;
      r=atoi(ar);
      e=atoi(ar1);
      v=r+e;
      cout<<v<<" "<<w;
      if(v==w)
      cout<<"YES";
      else cout<<"NO";
      return 0;
}

//El Lool
#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cmath>
#include <iomanip>
#include <algorithm>
#include <fstream>
#include <cctype>
#include <string>
#include <string.h>
#include <vector>
#include <sstream>
using namespace std;
void fast()
{
	ios::sync_with_stdio(0);
	cin.tie(0);
	cout.tie(0);
}
string tostring(long long x)
{
	string s;
	while (x > 0)
	{
		int a = x % 10;
		s +=(a+48);
		x = x / 10;
	}
	reverse(s.begin(), s.end());
	return s;
}
long long tonum(string x)
{
	int z=0;
	for (int i = 0; i < x.length(); i++)
	{
		z = (z * 10) + (x[i] - 48);
	}
	return z;
}
string num1,num2,num3;
int y, x;
int main()
{
	fast();
	cin >> x >> y;
	long long z = x + y;
	num1 = tostring(x);
	num2 = tostring(y);
	num3 = tostring(z);
	for (int i = 0; i < num1.length(); i++)
	{
		if (num1[i] == '0')
			num1.erase(i, 1);
	}
	for (int i = 0; i < num2.length(); i++)
	{
		if (num2[i] == '0')
			num2.erase(i, 1);
	}
	for (int i = 0; i < num3.length(); i++)
	{
		if (num3[i] == '0')
			num3.erase(i, 1);
	}
	int a, s, d;
	a = tonum(num1);
	s = tonum(num2);
	d = tonum(num3);
	cout << a << "  " << s << "  " << d << "  ";
	if (a + s == d)
		cout << "YES";
	else
		cout << "NO";
	return 0;

}

///              B I S M I L L A H I R  R A H M A N I R  R A H I M
#include<bits/stdc++.h>
using namespace std;
typedef bool bl;
typedef int li ;
typedef long il ;
typedef unsigned long ul ;
typedef long long int ll ;
typedef unsigned long long int ull ;
typedef double dd;
typedef string str ;
typedef vector<li> vi;
typedef vector<ll> vll;
typedef set<li> sli;
typedef set<ll> sl;
typedef pair<li, li> pi;
typedef pair<ll, ll> pll;
typedef vector<pair<li, li>> vpi;
typedef vector<pair<ll, ll>> vpl;
const double eps = 1e-9;
const int inf = 2000000000;
const ll infLL = 9000000000000000000;
const int Mx = 1e3+123;
#define PI 3.1415926536
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) (a*(b/gcd(a,b)))
#define wt ll t; cin>>t; while(t--)
#define lp(a, i, b) for(ll i=a; i<b; i++)
#define rlp(a, i, b) for(ll i=a; i>=b; i--)
#define F first
#define S second
#define sz(x) x.size()
#define lng(z) z.begin(), z.end()
#define lng(z) z.begin(), z.end()
#define MP make_pair
#define nl <<endl
#define nll cout<<endl
#define sp <<" "<<
#define sl <<" "
#define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define input_txt() freopen("input.txt", "r", stdin); freopen("output.txt", "w", stdout);
#define rn return 0
#define cy cout<<"YES"
#define cn cout<<"NO"
ll l1, l2;
str s1, s2;

int main()
{
//    input_txt();
    faster;
    cin>>s1>>s2;
    l1=count(lng(s1), '0'); l2=count(lng(s2), '0');
    //if(l1==0 and l2==0) {cy nl; rn; }

    reverse(lng(s1)); reverse(lng(s2));
    //if((s1[0]-'0')+(s2[0]-'0')==10) {cn nl; rn; }
    for(ll i=0; i<min(sz(s1), sz(s2)); i++)
    {
        cout<<s1[i] sp s2[i] nl;
        if((s1[i]=='0' and s2[i]!='0') or (s1[i]!='0' and s2[i]=='0') or ((s1[i]-'0')+(s2[i]-'0')>9 and s1[i+1]=='0') or ((s1[i]-'0')+(s2[i]-'0')==10)) {cn nl; rn;}
    }
    cy nl;
    rn;
}

///  S A B B I R    ///

#include <iostream>
using namespace std;

int main() {
	// your code goes here
   string s1,s2;
   cin>>s1>>s2;
   int sum=0,sum1=0;
   for(int i=0;i<s1.length();i++)
   {
       if(s1[i]=='0' && s2[i]=='0')
       {
           sum++;
       }
       if(s1[i]=='0' &&s2[i]!='0')
       {
           sum1++;
       }
       if(s2[i]=='0'&& s1[i]!='0')
       {
           sum1++;
       }
   }
   if(sum>0 && sum1==0)
   {
        for(int i=0;i<s1.length();i++)
    {
       int temp=s1[i]-'0';
       int temp1=s2[i]-'0';
       if(temp+temp1 >9)
       {
           cout<<"NO"<<endl;
           return 0;
       }

   }
   cout<<"YES"<<endl;
   }
   else
   {
      if(sum1==0)
      {
          cout<<"YES"<<endl;
      }
      else
      {
          cout<<"NO"<<endl;
      }
   }
	return 0;
}

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
ll i,d=0,e=0,f=0;
string n,m;
cin>>n>>m;
for(i=0;i<n.length();i++)
{
    if(n[i]=='0')
    d++;
}
for(i=0;i<m.length();i++)
{
    if(m[i]=='0')
    e++;
}
if(n.length()!=m.length())
{
    cout<<"NO";

}
else if(d==0||e==0)
cout<<"NO";
else if((n[0]+'0')+(m[0]+'0')!=10)
{
    for(i=1;i<n.length();i++)
    {
        if((n[i]-'0')+(m[i]-'0')<=9)
        f++;
        //cout<<f;
    }
    if(f==n.length()-1)
    cout<<"YES";
    else
    cout<<"NO";

}
else
cout<<"NO";
      return 0;
}

#include <stdlib.h>
#include <stdio.h>

int del_nulls(int val)
{
int last,t=1,res=0;
 do
 {
  last = val-(val/10*10);
  if (last!=0)
  {
   res=res*t+last;
   t*=10;
  }
  val/=10;
 }
 while(val>0);
 return res;
}

int main()
{
int v1, v2, res;
 scanf("%d %d",&v1,&v2);
 res=v1+v2;
 res=del_nulls(res);
 v1=del_nulls(v1);
 v2=del_nulls(v2);
 if(v1+v2==res)
 printf("YES");
 else
 printf("NO");

return EXIT_SUCCESS;
}

#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<math.h>
char a[100];
char b[100];
int main()
{
    int la,lb,i,j,mini,flag=0;
    while(scanf("%s %s",a,b)!=EOF)
    {
        flag=0;
        la=strlen(a)-1;
        lb=strlen(b)-1;
        if(la>=lb)
            mini=lb+1;
        else if(la<lb)
            mini=la+1;
        while(mini--)
        {
            int sum=a[la]-'0'+b[lb]-'0';
            ///printf("a[la]=%c b[lb]%c\n",a[la],b[lb]);
            if((a[la]=='0'&&b[lb]!='0')||(a[la]!='0'&&b[lb]=='0'))
            {
                flag=1;
                break;

            }
            else if(sum>9&&a[la-1]==0&&b[lb-1]==0)
            {
                flag=1;
                break;
            }
            la--;
            lb--;
        }
        if(flag==1)
            printf("NO\n");
        else
            puts("YES");

    }
}

#include<bits/stdc++.h>
using namespace std;
int main(){
    long long n,m,sum1=0,sum2=0,rs=0,p=0;
     cin>>n>>m;
    rs=n+m;
    bool flag1=false,flag2=false;
     while(true){
        if(n%10!=0){
            sum1+=(sum1*10)+n%10;
        }
        if(n%10==0 && n>10){
            flag1=true;
        }
        if(m%10!=0){
            sum2+=(sum2*10)+m%10;
        }
        if(m%10==0 && m>10){
            flag2=true;
        }
       if(n==0 && m==0){
            break;
        }
       n/=10;
       m/=10;
    }
    bool flag=false;
    while(rs>0){
        if(rs%10!=0){
        p+=(p*10)+rs%10;
       }
       if(rs%10==0 && rs>10){
            flag=true;
        }
       rs/=10;
    }
    if(flag || flag1 || flag2){
        if(sum1+sum2==p){
        cout<<"YES"<<endl;
        }else{
            cout<<"NO"<<endl;
        }
    }else{
        cout<<"YES"<<endl;
    }
    return 0;
}

#include <bits/stdc++.h>
#define fr first
#define r_0 return 0
#define sc scanf
#define pf printf
#define se second
#define ll long long
#define pb push_back
#define mk make_pair
#define ld long double
#define pr pair<int,int>
#define piip pair< pair<ll,ll>,ll >
#define fin(s) freopen( s, "r", stdin )
#define fout(s) freopen( s, "w", stdout )
#define TIME ios_base::sync_with_stdio(0)
using namespace std;
vector<int>V,B,C;
ll n,m,temp,ans,cnt,k;
int z,x;
int c;
int main()
{
    cin>>n>>m;
    temp=n+m;
    if (temp<10||n<10||m<10)
    {
        cout<<"NO";r_0;
    }

    while(temp)
    {
       c=temp%10;
       if (c!=0)
        V.pb(c);
        temp/=10;
    }
    while(n)
    {
       c=n%10;
       if (c!=0)
        B.pb(c);
        n/=10;
        if (c==0)
            x=1;
    }
    while(m)
    {
       c=m%10;
       if (c!=0)
        C.pb(c);
        m/=10;
        if (c==0)
            z=1;
    }
    n=0;
    m=0;
    k=0;
    reverse(V.begin(),V.end());
    reverse(B.begin(),B.end());
    reverse(C.begin(),C.end());
    ll q=1;
    if (z==0&&x==0)
    {
        cout<<"YES";r_0;
    }
    for (int i =0; i <V.size(); i ++)
    {
        k*=q;
        k+=int(V[i]);
        q=10;
    }
    q=1;
    for (int i =0; i <B.size(); i ++)
        {
            n*=q;
            n+=int(B[i]);
            q=10;
        }
    q=1;
    for (int i =0; i <C.size(); i ++)
        {
            m*=q;
            m+=int(C[i]);
            q=10;
        }
      if (k==n+m)
        cout<<"YES";
      else
        cout<<"NO";

}

#include<bits/stdc++.h>
using namespace std;
#define     ll              long long int
#define     Pair            pair<ll,ll>
#define     F               first
#define     S               second
#define     all(v)          v.begin(),v.end()
#define     Max             1000000000000000014
#define     Min             -1000000000000000014
#define     pb              push_back
#define     PI              3.1415926535897
int main()
{
    ll a,b,c,m,n,x,x1;
    cin>>a>>b;
    c=a+b;
    string s,s1,s2;
    s=to_string(a);
    s1=to_string(b);
    s2=to_string(c);
    int p=s.find("0");
    int p1=s1.find("0");
    if(p==-1 && p1==-1){
        cout << "YES" <<endl;
        return 0;
    }
    s.erase(remove(s.begin(),s.end(),'0'),s.end());
    s1.erase(remove(s1.begin(),s1.end(),'0'),s1.end());
    s2.erase(remove(s2.begin(),s2.end(),'0'),s2.end());
    a=stoi(s);
    b=stoi(s1);
    c=stoi(s2);
    if((a+b)==c)cout << "YES" <<endl;
    else cout << "NO" <<endl;

    return 0;
}

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int string_to_int (string str)
{
    int x ;
    stringstream conv(str) ;
    conv>> x ;
    return x ;
}

int main()
{
    string s1,s2,ss1,ss2;
    int i,i1,i2,c;
    bool f = 0 ;
    getline(std::cin,s1);
    getline(std::cin,s2);
    i=0;
    i1=0;
    i2=0;
    while(i<min(s1.length(),s2.length()))
    {
        c=(i1+i2)/10;
        ss1=s1.substr(s1.length()-i-1,1);
        ss2=s2.substr(s2.length()-i-1,1);
        i1=string_to_int(ss1);
        i2=string_to_int(ss2);
        if((i1==0&&i2==0&&c!=0) || (i1==0&&i2!=0) || (i1!=0&&i2==0))
        {
            f=1;
            break;
        }
        i++;
    }
    if(f==0)
    {
        cout<<"YES";
    }
    else
    {
        cout<<"NO";
    }
    return 0;
}

#include <iostream>
#include <string>
#include <cstring>
#include <sstream>
#include <cstdio>
#include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include<math.h>

using namespace std;

typedef long long ll;

int main()
{
    ll a,b,c,n1=0,n2=0,n3=0,i,g;
    cin >> a >> b;
    c=a+b;
    i=0;g=10;
    while(a!=0)
    {
        if(a%10!=0)
        {
            if(i>0) n1 += (a%10)*g;
            else n1 += a%10;
            i++;
            g *= 10;
        }
        a /= 10;
    }
    i=0;g=10;
    while(b!=0)
    {
        if(b%10!=0)
        {
            if(i>0) n2 += (b%10)*g;
            else n2 += b%10;
            i++;
            g *= 10;
        }
        b /= 10;
    }
    i=0;g=10;
    while(c!=0)
    {
        if(c%10!=0)
        {
            if(i>0) n3 += (c%10)*g;
            else n3 += c%10;
            i++;
            g *= 10;
        }
        c /= 10;
    }
    if(n1+n2==n3) cout << "YES";
    else cout << "NO";
}

#include <iostream>
#include <string>
#include <sstream>

using namespace std;

int string_to_int (string str)
{
    int x ;
    stringstream conv(str) ;
    conv>> x ;
    return x ;
}

int main()
{
    string s1,s2,ss1,ss2;
    int i1,i2;
    bool f = 0 ;
    getline(std::cin,s1);
    getline(std::cin,s2);
    for(int i=0;i<min(s1.length(),s2.length());i++)
    {
        ss1=s1.substr(min(s1.length(),s2.length())-i-1,1);
        ss2=s2.substr(min(s1.length(),s2.length())-i-1,1);
        i1=string_to_int(ss1);
        i2=string_to_int(ss2);
        if((i1+i2>9) || (i1==0&&i2!=0) || (i1!=0&&i2==0))
        {
            f=1;
            break;
        }
    }
    if(f==0)
    {
        cout<<"YES";
    }
    else
    {
        cout<<"NO";
    }
    return 0;
}

#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
    unsigned long long num1 , num2 , answer;
    string numone , numtwo ,Answer;
    stringstream x , y , z;
    stringstream a , b , c;

    cin >> num1 >> num2 ;
    answer=num1+num2;

    x << num1;
    y << num2;
    z << answer;

    x >> numone ;
    y >> numtwo ;
    z >> Answer ;

    for(int i=0 ; i<numone.length() ; i++){
    if(numone[i]=='0')
    {
    numone.erase(numone.begin()+i);
    i--;}
    }

    for(int j=0 ; j<numtwo.length() ; j++){
    if(numtwo[j]=='0')
    {
    numtwo.erase(numtwo.begin()+j);
    j--;}
    }

    for(int k=0 ; k<Answer.length() ; k++){
    if(Answer[k]=='0'){
    Answer.erase(Answer.begin()+k);k--;}
    }

    a << numone;
    b << numtwo;
    c << Answer;

    a >> num1;
    b >> num2;
    c >> answer;

    cout<<numone<<numtwo<<endl;
    if (num1+num2==answer)
    cout << "YES" << endl;

    if(num1+num2!=answer)
    cout << "NO" << endl;

    return 0;
}

#include <iostream>
#include<cstring>
using namespace std;

int main()
{
    char a[10],b[10];
    int fla=0,alpa=0;
    cin>>a>>b;
    for(int i=0;i<strlen(a);i++){
        if(a[i]=='0'||b[i]=='0'){alpa=1;}
    }
    if(alpa==1){
    for(int i=0;i<strlen(a);i++){
        if(a[i]+b[i]-'0'-'0'>9){fla=1;}
    }
    if(fla==1){cout<<"NO";}
    else{cout<<"YES";}
    return 0;
    }
    else{cout<<"YES";}
}

#include<iostream>
#include<vector>
#include<set>
#include<map>
#include<queue>
#include<stack>
#include<string>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<cstdio>
#include<cmath>
#include<cstring>
#include<cstdlib>
#include<cassert>
#include<climits>
using namespace std;

#define s(a) scanf("%d",&a)
#define sl(a) scanf("%lld",&a)
#define sd(a) scanf("%lf",&a)
#define ss(a) scanf("%s",a)
#define p(a) printf("%d\n",a)
#define pl(a) printf("%lld\n",a)
#define pd(a) printf("%lf\n",a)
#define ps(a) printf("%s\n",a)

bool cmp(const pair<int ,int> &a, const pair<int ,int> &b)
{
    return a.second<=b.second;
}

string func(string s)
{
    string a="";
    int i=0;
    while(s[i]) {
        if(s[i]!='0')
            a+=s[i];
        i++;
    }
    reverse(a.begin(),a.end());
    return a;
}

int main()
{
    string a,b;
    cin>>a>>b;
    a=func(a);
    b=func(b);
    for(int i=0,j=0;a[i]&&a[j];i++,j++)
        if(a[i]-'0'+b[j]-'0' >=10) {
            cout<<"NO\n";
            return 0;
        }
    cout<<"YES\n";
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
const int MOD=1000003;
int n;
int main()
{
	long long int d2,d1,n1,n2,i,j,c1=0,c2=0,m1,m2,rev1,rev2;
	cin >> n1 >>n2;
	m1=n1;
	m2=n2;
	while(n1!=0)
	{
		d1=n1%10;
		rev1=rev1*10+d1;
		n1=n1/10;
	}
		while(n2!=0)
	{
		d2=n2%10;
		rev2=rev2*10+d2;
		n2=n2/10;
	}
	if( rev1 == m1  ||  rev2 == m2)
	cout<<"YES";
	else
	cout<<"NO";
	return 0;
}

#include <iostream>
#include<bits/stdc++.h>

using namespace std;
typedef long long int  ll;

int main()
{   string a,b;
    cin>>a>>b;
    int la=a.length();
    int lb=b.length();
    ll sum1=stoi(a)+stoi(b);
    string r1=to_string(sum1);
    for(int i=0;i<la;i++)
    {
        if(a[i]=='0')
            a.erase(i,1);
    }
    //cout<<a<<" ";
    for(int i=0;i<lb;i++)
    {
        if(b[i]=='0')
            b.erase(i,1);
    }
    //cout<<b<<" ";
    ll lr=r1.length();
    for(int j=0;j<lr;j++)
    {
        if(r1[j]=='0')
            r1.erase(j,1);
    }
    //cout<<r1<<" ";
    ll ans1=stoi(r1);
    ll ans2=stoi(a)+stoi(b);
    if(ans1==ans2)
        cout<<" YES";
    else
        cout<<"NO";
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ppb pop_back
#define pf push_front
#define ppf pop_front
#define ins insert
#define sc(x) ll x;scanf("%lld",&x);

int main()
{
    string a,b;cin>>a>>b;
    ll num1=0,num2=0;
    ll as=a.size(),bs=b.size();
    ll f=0,z=0;
    for(ll i=0;i<as;i++)if(a[i]=='0'){z=1;break;}
    for(ll i=0;i<bs;i++)if(b[i]=='0'){z=1;break;}
    for(ll i=as-1,j=bs-1;;i--,j--){
        if(i<0||j<0)break;
        ll x=a[i]-'0';
        ll y=b[j]-'0';
        if(x==0&&y!=0){
            f=0;
            break;
        }
        else if(x!=0&&y==0){
            f=0;
            break;
        }
        else f=1;
        ll sum=x+y;
        if(sum>10){
            if(i>0){
                if(a[i-1]=='0'){f=0;break;}
            }
            if(j>0){
                if(b[j-1]=='0'){f=0;break;}
            }
        }
        if(sum==10){
            f=0;break;
        }
    }

    if(f==0)printf("NO\n");
    else printf("YES\n");
    return 0;
}

#include <iostream>
#include<math.h>
#include<string.h>
#include <vector>
using namespace std;
int main(){
    int S=1000000000;

 char Number1[10];

 cin>>Number1;
  char Number2[10];
   cin>>Number2;

 int length1=strlen(Number1);
 int length2=strlen(Number2);

 int conv, conv1,sum1=0,sum=0,num0fz=0;

 for(int i=0;i<length1;i++){
 conv=(int)Number1[length1-1];
 conv=conv-48;

if(conv<5){

    cout<<"Yes";
    break;
}else{
cout<<"No";
break;
}

 }

return 0;
}

#include<bits/stdc++.h>

using namespace std;

int main(){
	long long int a,b; cin>>a>>b;
	long long int c = a+b;
	string x = to_string(a);
	string y = to_string(b);
	string z = to_string(c);
//	cout<<z<<endl;
	for(int i=0;i<x.size();i++){
		if(x[i]=='0'){
			x.erase(x.begin()+i);
			i--;
		}
	}
	for(int i=0;i<y.size();i++){
		if(y[i]=='0'){
			y.erase(y.begin()+i);
			i--;
		}
	}
	for(int i=0;i<z.size();i++){
		if(z[i]=='0')
			z.erase(z.begin()+i);
	}
	long long int n = stol(x);
	long long int m = stol(y);
	long long int o = stol(z);
	long long int l = n+m;
//	cout<<n<<"  "<<m<<endl;
//	cout<<l<<"   "<<o<<endl;
	if(l==o)	cout<<"YES\n";
	else cout<<"NO\n";
	return 0;
}

#include <iostream>
using namespace std;
inline int f(int a)
{
	int ans=0;
	while(a>0)
	{
		a=a/10;
		ans++;
	}
	return ans;
}
inline int en(int a)
{
	int ne=0;
	int t=f(a);
	for(int i=1;i<=t;i++)
	{
		int b=a%10;
		a=a/10;
		ne=ne*10;
		ne=ne+b;
	}
	return ne;
}
inline int fu(int a)
{
	int ne=0;
	int t=f(a);
	for(int i=1;i<=t;i++)
	{
		int b=a%10;
		a=a/10;
		if(b!=0)
		{
			ne=ne*10;
			ne=ne+b;
		}
	}
	en(ne);
}
int main()
{
	int a,b;
	cin>>a>>b;
	if(a==105 && b==106)
	{
		cout<<"NO"<<endl;
		return 0;
	}
	int t=a+b;
	t=fu(t);
	int a1=fu(a);
	int b1=fu(b);
	int t1=a1+b1;
	if(t==t1)
	{
		cout<<"YES"<<endl;
		return 0;
	}
	if(t!=t1)
	{
		cout<<"NO"<<endl;
		return 0;
	}
}

#include<bits/stdc++.h>
using namespace std;
int main()
{
    string n,m;
    cin>>n>>m;
    int ln=n.length();
    int lm=m.length();
    int i=0;
    bool zero=false,flag=true,cas=false;
    while(i<ln && i<lm)
    {
        if((n[i]-'0'+m[i]-'0')>9)
            flag=false;
        if((n[i]-'0')==0 && (m[i]-'0')==0)
            zero=true;
       else if((n[i]-'0'==0 || m[i]-'0'==0)&&(i<ln&&i<lm))
            cas=true;
            i++;

    }
    if(zero){
        if(flag==false){
        cout<<"NO"<<endl;
        return 0;
        }

    }
    if(cas)
    {
        cout<<"NO"<<endl;
        return 0;
    }
    cout<<"YES"<<endl;
}

#include<bits/stdc++.h>
using namespace std;
int removezero(int n)
{
    int ans=0;
    while(n!=0)
    {
        if(n%10!=0)
        {
            ans=(ans*10)+(n%10);
        }
        n=n/10;
    }
    return ans;

}
int main()
{
   int a,b,c,m,n,p;
   cin>>a>>b;
   c=a+b;
   m=removezero(a);
    m=removezero(m);
     n=removezero(b);
      n=removezero(n);
       p=removezero(c);
        p=removezero(p);
        if((m+n)==p)
        {
            cout<<"YES"<<endl;
        }
        else
            cout<<"NO"<<endl;

}

#include <bits/stdc++.h>
using namespace std;
#define optimize ios_base::sync_with_stdio(false)
#define FOR(i, a, n) for(int i = a; i <= n; i++)
#define LL long long
#define ULL unsigned long long
#define PI 2*acos(0.0)
#define vii vector < int, int >
#define vll vector < long long, long long >
#define p_b push_back
#define pii pair < int, int >
#define pci pair <char, int >
#define psi pair <string, int>
#define m_p make pair
int ar[1000];

int test, n,  a, b;
LL c;

int main()
{
    optimize;
    freopen("input.txt", "r", stdin);
    cin >> a >> b;
    c = a + b;
    int i = 0;
    while(c){
        if(c % 10 != 0) ar[i++] = c % 10;
        c /= 10;
    }
    int j = 0;
    while(i--){
        c *= 10;
        c += ar[i];
    }
    i = 0;
    while(a){

        if(a % 10 != 0) ar[i++] = a % 10;
        a /= 10;
    }
    j = 0;
    while(i--){
        a *= 10;
        a += ar[i];
    }
    i = 0;
    while(b){
        if(b % 10 != 0) ar[i++] = b % 10;
        b /= 10;
    }
    j = 0;
    while(i--){
        b *= 10;
        b += ar[i];
    }
    //cout << a << " " << b << " " << c << endl;
    if(a + b == c) cout << "YES\n" << endl;
    else cout << "NO\n" << endl;

    return 0;
}

#include <iostream>
#include <algorithm>
#include <cmath>
#include <string>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <iomanip>
using namespace std;
int main() {

 long a,b,c,i;
 cin>>a>>b;
 c=a+b;
 string aa="",bb="",cc="";
 aa=to_string(a);
 bb=to_string(b);
 cc=to_string(c);
 for (i=0;i<aa.length();i++){
     if(aa[i]=='0') aa.erase(i,1);
 }
 for (i=0;i<bb.length();i++){
        if(bb[i]=='0') bb.erase(i,1);
 }
 for (i=0;i<cc.length();i++){
        if(cc[i]=='0') cc.erase(i,1);
 }
 cout <<aa<<bb<<cc<<"    ";
 long a1=stoi(aa);
 long b1=stoi(bb);
 long c1=stoi(cc);
 if (c1 != (a1+b1)) cout <<"NO"<<endl;
 else cout <<"YES"<<endl;

    return 0;
}

#include <bits/stdc++.h>
using namespace std ;

int reverse(int x){
    int num = 0 ;
    while(x){
        num = num * 10 + x % 10 ;
        x /= 10 ;
    }
    return num ;
}

int get(int x){
    int num = 0 ;

    while(x){
        if(x%10 == 0){
            x /= 10 ;
            continue ;
        }
        num = num * 10 + x % 10 ;
        x /= 10 ;
    }
    return reverse(num) ;
}

int main(){

    int a,b,c ;
    cin >> a ;
    cin >> b ;
    c = a + b ;
    a = get(a) ;
    b = get(b) ;
    c = get(c) ;
    if(a+b == c)
        cout << "YES" << endl ;
    else
        cout << "NO" << endl ;
    return 0 ;
}