#include <bits/stdc++.h>
#define pb(x) push_back(x)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define F(w,x,y) for(ll w=x; w<y; w++)
#define endl "\n"
#define mod 1000000007
#define INF 1000000000
typedef long long ll;
typedef long double ld;
using namespace std;

void play()
{
    ll a,b,c;
    cin>>a>>b>>c;
    if(a*a+b*b<c*c)
        cout<<"Yes\n";
    else
        cout<<"No\n";
}

int main()
{
    //freopen("input.txt","r",stdin);
    //freopen("output.txt","w",stdout);
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    ll t;
    t=1;
    //cin>>t;
    while(t--)
    {
        play();
    }
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define sz(x) (int)x.size()
#define pb push_back
#define mp make_pair
#define ll long long 
#define mod 1000000007 
#define mod2 998244353
void fast(){
  ios_base::sync_with_stdio(false);cin.tie(NULL);
}
long long binpow(long long a, long long b) {
    if (b == 0)
        return 1;
    long long res = binpow(a, b / 2);
    if (b % 2)
        return res * res * a;
    else
        return res * res;
}


int main() {
   fast();
   string s1,s2,s3;
   cin>>s1>>s2>>s3;
   set<char> s;
   for(int i=0;i<s1.length();i++){
    s.insert(s1[i]);
   }
   for(int i=0;i<s2.length();i++){
    s.insert(s2[i]);
   }
   for(int i=0;i<s3.length();i++){
    s.insert(s3[i]);
   }
   if(s.size()>10){
    cout<<"UNSOLVABLE"<<"\n";
    return 0;
   }
   vector<ll int> v;
   for(int i=0;i<10;i++){
    v.pb((ll)i);
   }
   vector<char> fin;
   for(char b:s){
    fin.pb(b);
   }
   map<char,ll int> mt; 
   reverse(s1.begin(),s1.end());
   reverse(s2.begin(),s2.end());
   reverse(s3.begin(),s3.end());
   do{
     for(int i=0;i<fin.size();i++){
      mt[fin[i]]=v[i];
     }
     ll int num1=0;
     ll int num2=0;
     ll int num3=0;
     int x=s1.length()-1;
     int y=s2.length()-1;
     int z=s3.length()-1;
     if(mt[s1[x]]==0 || mt[s2[y]]==0 || mt[s3[z]]==0){
     	;
     }else{
     for(int i=0;i<s1.size();i++){
       num1+=(mt[s1[i]])*binpow((ll)(10),(ll)i);
     }
     for(int i=0;i<s2.size();i++){
       num2+=(mt[s2[i]])*binpow((ll)(10),(ll)i);
     }
     for(int i=0;i<s3.size();i++){
       num3+=(mt[s3[i]])*binpow((ll)(10),(ll)i);
     }
     if(num1+num2==num3){
      cout<<num1<<"\n";
      cout<<num2<<"\n";
      cout<<num3<<"\n";
      return 0;
     }
     }


   }while(next_permutation(v.begin(),v.end()));
   cout<<"UNSOLVABLE"<<"\n";



}