#include <bits/stdc++.h>
using namespace std;
int par[100010];
int find_par(int x) {
  if (x != par[x]) {
    return par[x] = find_par(par[x]);
  }
  return par[x];
}
int main() {
  int n, a, b, ar[100010], dis_set[100010], state[100010];
  bool flg;
  map<int, int> mp;
  mp.clear();
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> ar[i];
    mp[ar[i]] = i;
    par[i] = i;
    dis_set[i] = 0;
  }
  for (int i = 1; i <= n; i++) {
    if (mp[a - ar[i]]) {
      par[find_par(mp[a - ar[i]])] = find_par(i);
      dis_set[i] |= 1;
    }
    if (mp[b - ar[i]]) {
      par[find_par(mp[b - ar[i]])] = find_par(i);
      dis_set[i] |= 2;
    }
  }
  for (int i = 1; i <= n; i++) {
    state[i] = 3;
  }
  for (int i = 1; i <= n; i++) {
    state[find_par(i)] &= dis_set[i];
  }
  flg = true;
  for (int i = 1; i <= n; i++) {
    if (state[i] == 0) {
      flg = false;
      break;
    }
  }
  if (flg == false)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) {
      int cur_state = state[find_par(i)];
      cout << (char)('0' + ((cur_state & 1) == 0));
      if (i != n) cout << " ";
    }
    cout << endl;
  }
  return 0;
}
