#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f, N = 1e5 + 10;
int n, a, b, sq[N], f[N], co[N];
bool in[N];
map<int, int> id;
inline void read(int &x) {
  x = 0;
  char c = getchar(), f = 1;
  while (!isdigit(c)) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    x = x * 10 + c - '0';
    c = getchar();
  }
  x *= f;
}
int find(int x) { return f[x] = f[x] == x ? x : find(f[x]); }
inline void merge(int x, int y) {
  x = find(x), y = find(y);
  if (x != y) f[x] = y;
}
signed main() {
  memset(co, -1, sizeof(co));
  read(n), read(a), read(b);
  for (int i = 1; i <= n; ++i) {
    read(sq[i]);
    id[sq[i]] = f[i] = i;
  }
  f[n + 1] = n + 1;
  for (int i = 1; i <= n; ++i) {
    if (id[a - sq[i]] > 0)
      merge(i, id[a - sq[i]]);
    else
      merge(i, n + 1);
    if (id[b - sq[i]] > 0)
      merge(i, id[b - sq[i]]);
    else
      merge(i, 0);
  }
  if (find(0) == find(n + 1)) {
    puts("NO");
    return 0;
  }
  for (int i = 1; i <= n; ++i) {
    int blg = find(i);
    if (co[blg] != -1) {
      in[i] = co[blg];
      continue;
    }
    if (blg == find(0))
      in[i] = co[blg] = 0;
    else
      in[i] = co[blg] = 1;
  }
  puts("YES");
  for (int i = 1; i <= n; ++i) printf("%d ", in[i]);
  return 0;
}
