#include <bits/stdc++.h>
using namespace std;
const int Maxn = 100005;
int n, a, b;
set<pair<int, int> > S;
int res[Maxn];
bool Exist(int need, pair<int, int> &res) {
  set<pair<int, int> >::iterator it = S.lower_bound(pair<int, int>(need, 0));
  if (it != S.end() && it->first == need) {
    res = *it;
    return true;
  }
  return false;
}
bool canSolve() {
  set<pair<int, int> >::iterator st = S.begin(), en = S.end();
  en--;
  pair<int, int> v = *st, u = *en;
  if (v.first + u.first == a) {
    res[v.second] = res[u.second] = 0;
    S.erase(v);
    if (v != u) S.erase(u);
    return true;
  } else if (v.first + u.first == b) {
    res[v.second] = res[u.second] = 1;
    S.erase(v);
    if (v != u) S.erase(u);
    return true;
  } else if (a - v.first < u.first && b - v.first > u.first) {
    pair<int, int> cand;
    if (Exist(a - v.first, cand)) {
      res[v.second] = res[cand.second] = 0;
      S.erase(v);
      if (v != cand) S.erase(cand);
      return true;
    }
    return false;
  } else if (a - v.first > u.first && b - v.first < u.first) {
    pair<int, int> cand;
    if (Exist(b - v.first, cand)) {
      res[v.second] = res[cand.second] = 1;
      S.erase(v);
      if (v != cand) S.erase(cand);
      return true;
    }
    return false;
  }
  return false;
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 0; i < n; i++) {
    int p;
    scanf("%d", &p);
    S.insert(pair<int, int>(p, i));
  }
  while (!S.empty())
    if (!canSolve()) {
      printf("NO\n");
      return 0;
    }
  printf("YES\n");
  for (int i = 0; i < n; i++) printf("%d%c", res[i], i + 1 < n ? ' ' : '\n');
  return 0;
}
