include<iostream>
include<string>
include<stdlib.h>
include<algorithm>
using namespace std;
int main()
{
int a,b;
cin>>a>>b;
int sum1=a+b;
string sa;
string sb;
sa = to_string(a);
sb = to_string(b);
string ssum1 = to_string(sum1);
reverse(sa.begin(),sa.end());
reverse(sb.begin(),sb.end());
reverse(ssum1.begin(),ssum1.end());
int aa= atoi(sa.c_str());
int bb= atoi(sb.c_str());
int sum2=aa+bb;
string ssum2=to_string(sum2);
if(ssum1==ssum2) cout<<sum1;
else cout<<"NO"<<endl;
return 0;
}