#include <bits/stdc++.h>
using namespace std;
inline void read(int &tx) {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  tx = x * f;
}
inline void write(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
int F[200001], v[200001], n, a, b;
map<int, int> mp;
inline int get(int x) { return x == F[x] ? x : F[x] = get(F[x]); }
inline void merge(int x, int y) {
  int tx = get(x), ty = get(y);
  if (tx == ty) return;
  F[tx] = ty;
}
int main() {
  read(n);
  read(a);
  read(b);
  mp.clear();
  for (int i = 1; i <= n; i++) {
    read(v[i]);
    mp[v[i]] = i;
  }
  for (int i = 1; i <= n + 2; i++) F[i] = i;
  for (int i = 1; i <= n; i++) {
    if (mp[a - v[i]])
      merge(i, mp[a - v[i]]);
    else
      merge(i, n + 2);
    if (mp[b - v[i]])
      merge(i, mp[b - v[i]]);
    else
      merge(i, n + 1);
  }
  if (get(n + 1) == get(n + 2)) {
    puts("NO");
    return 0;
  }
  puts("YES");
  for (int i = 1; i <= n; i++)
    if (get(i) == get(n + 1))
      printf("0 ");
    else
      printf("1 ");
}
