#include<bits/stdc++.h>
using namespace std;
int n;
string s1,s2;
int main(){
//cin>>n;
while(cin>>s1>>s2)//以字符串读入
{
//p2r
int res1=atoi(s1.c_str())+atoi(s2.c_str());//转成数字相加
string tmp1=to_string(res1);
int restmp=res1;
reverse(tmp1.begin(),tmp1.end());//数字的和的翻转
res1=atoi(tmp1.c_str());
//r2p
reverse(s1.begin(),s1.end());//翻转数字
reverse(s2.begin(),s2.end());
int res2=atoi(s1.c_str())+atoi(s2.c_str());//翻转后数字的和
if(res1==res2){cout<<restmp<<endl;}
else {cout<<"NO"<<endl;}
}
return 0;
}