#include <bits/stdc++.h>
using namespace std;
int n;
int sum[2];
int d[100010];
int s[100010];
map<int, int> M;
bool finish(int x) {
  map<int, int>::iterator it = M.find(sum[1 - s[x]] - d[x]);
  bool f = it != M.end();
  if (!f) return true;
  int newx = it->second;
  if (s[newx] != -1) return true;
  s[newx] = s[x];
  it = M.find(sum[s[newx]] - d[newx]);
  f = it != M.end();
  if (!f) return false;
  if (s[newx] == 1 - s[newx]) return false;
  s[it->second] = s[newx];
  return finish(it->second);
}
bool solve() {
  if (sum[0] == sum[1]) {
    for (int i = 0; i < n; ++i) {
      s[i] = 0;
      map<int, int>::iterator ita = M.find(sum[0] - d[i]);
      bool fa = ita != M.end();
      if (!fa) return false;
    }
    return true;
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] != -1) continue;
    map<int, int>::iterator ita = M.find(sum[0] - d[i]);
    map<int, int>::iterator itb = M.find(sum[1] - d[i]);
    bool fa = ita != M.end() && s[ita->second] != 1;
    bool fb = itb != M.end() && s[itb->second] != 0;
    if (!fa && !fb) return false;
    if (fa && fb) continue;
    if (fa) {
      s[i] = s[ita->second] = 0;
      if (!finish(ita->second)) return false;
    }
    if (fb) {
      s[i] = s[itb->second] = 1;
      if (!finish(itb->second)) return false;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (s[i] == -1) s[i] = 0;
  }
  return true;
}
int main() {
  cin >> n >> sum[0] >> sum[1];
  for (int i = 0; i < n; ++i) {
    cin >> d[i];
    M[d[i]] = i;
    s[i] = -1;
  }
  if (solve()) {
    cout << "YES" << endl;
    cout << s[0];
    for (int i = 1; i < n; ++i) cout << " " << s[i];
    cout << endl;
  } else
    cout << "NO" << endl;
  return 0;
}
