func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 100000;   const int inf = (int)1e9 + 1;   const long long big = (long long)1e18 + 1;   const int P = 239;   const int MOD = (int)1e9 + 7;   const int MOD1 = (int)1e9 + 9;   const double eps = 1e-9;   const double pi = atan2(0, -1);   const int ABC = 26;   vector<int> g[N];   bool used[N];   vector<int> comp;   void dfs(int u) {     used[u] = true;     comp.push_back(u);     for (int v : g[u])       if (!used[v]) dfs(v);   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.precision(20);     int n, A, B;     cin >> n >> A >> B;     int a[n];     map<int, int> mapa;     for (int i = 0; i < n; i++) {       cin >> a[i];       mapa[a[i]] = i;     }     for (int i = 0; i < n; i++) {       if (mapa.find(A - a[i]) != mapa.end()) g[i].push_back(mapa[A - a[i]]);       if (mapa.find(B - a[i]) != mapa.end()) g[i].push_back(mapa[B - a[i]]);     }     int ans[n];     for (int i = 0; i < n; i++)       if (!used[i]) {         comp.clear();         dfs(i);         int mask = 3;         for (int j : comp) {           int cur = 0;           if (mapa.find(A - a[j]) != mapa.end()) cur |= 1;           if (mapa.find(B - a[j]) != mapa.end()) cur |= 2;           mask &= cur;         }         if (mask == 0) {           cout <<  NO n ;           return 0;         }         if (mask & 1) {           for (int j : comp) ans[j] = 0;         } else {           for (int j : comp) ans[j] = 1;         }       }     cout <<  YES n ;     for (int i = 0; i < n; i++) cout << ans[i] <<    ;     cout <<   n ;     return 0;   }   