#include <bits/stdc++.h>
using namespace std;
int n, a, b;
map<int, int> mp;
set<int> f, g;
vector<int> c;
int x;
int res[100005];
int flag;
void ini() {
  memset(res, 0, sizeof(res));
  flag = 1;
  mp.clear();
  f.clear();
  g.clear();
  c.clear();
  int i;
  int y;
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    mp[x] = i;
    f.insert(x);
  }
  for (set<int>::iterator it = f.begin(); it != f.end(); it++) {
    y = *it;
    if (f.find(a - y) == f.end()) {
      c.push_back(y);
    }
  }
  for (vector<int>::iterator it = c.begin(); it != c.end(); it++) {
    f.erase(*it);
    g.insert(*it);
  }
}
void solve() {
  while (g.empty() != 1) {
    set<int>::iterator it = g.begin();
    int y = *it;
    if (g.find(b - y) != g.end()) {
      res[mp[y]] = 1;
      res[mp[b - y]] = 1;
      g.erase(y);
      g.erase(b - y);
    } else {
      if (f.find(b - y) != f.end()) {
        res[mp[y]] = 1;
        res[mp[b - y]] = 1;
        g.erase(y);
        f.erase(b - y);
        if (f.find(a - (b - y)) != f.end()) {
          g.insert(a - (b - y));
          f.erase(a - (b - y));
        }
      } else {
        flag = 0;
        return;
      }
    }
  }
}
void out() {
  if (flag == 0) {
    printf("NO\n");
  } else {
    printf("YES\n");
    printf("%d", res[1]);
    for (int i = 2; i <= n; i++) {
      printf(" %d", res[i]);
    }
    printf("\n");
  }
}
int main() {
  while (scanf("%d%d%d", &n, &a, &b) != EOF) {
    ini();
    solve();
    out();
  }
  return 0;
}
