#include <bits/stdc++.h>
using namespace std;
void zanj0() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void out(vector<long long int>& v) {
  for (long long int i : v) {
    cout << (i ^ 1) << " ";
  }
  cout << "\n";
}
void solve() {
  long long int n, a, b;
  cin >> n >> a >> b;
  vector<long long int> v(n);
  for (long long int i = 0; i < n; i++) {
    cin >> v[i];
  }
  map<long long int, long long int> idx;
  vector<long long int> ret(n);
  for (long long int i = 0; i < n; i++) {
    idx[v[i]] = i;
  }
  queue<long long int> q;
  for (long long int i = 0; i < n; i++) {
    if (idx.count(a - v[i])) {
      ret[i] = 1;
    } else {
      q.push(i);
    }
  }
  while (!q.empty()) {
    long long int i = q.front();
    q.pop();
    long long int val = v[i];
    if (idx.count(b - val)) {
      long long int other = b - val;
      long long int j = idx[other];
      if (ret[j]) {
        ret[j] = 0;
        long long int otherOfOther = a - other;
        long long int k = idx[otherOfOther];
        ret[k] = 0;
        q.push(k);
      }
    } else {
      cout << "NO"
           << "\n";
      return;
    }
  }
  cout << "YES"
       << "\n";
  out(ret);
}
int32_t main() {
  zanj0();
  solve();
  cerr << "Time : " << 1000 * (long double)clock() / (long double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
