#include <bits/stdc++.h>
using namespace std;
int n, a, b, d;
int p[100100];
set<int> s;
map<int, int> mp;
int f[100100];
int find(int x) {
  if (x == f[x]) return x;
  return f[x] = find(f[x]);
}
void A(int a, int b) {
  int A = find(a), B = find(b);
  if (A == B) return;
  f[B] = A;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", p + i);
    s.insert(p[i]);
    mp[p[i]] = ++d;
    f[i] = i;
  }
  f[n + 1] = n + 1;
  f[n + 2] = n + 2;
  for (int i = 1; i <= n; i++) {
    int x = p[i];
    if (s.count(a - x)) {
      A(mp[x], mp[a - x]);
    } else {
      A(n + 1, mp[x]);
    }
    if (s.count(b - x)) {
      A(mp[x], mp[b - x]);
    } else {
      A(n + 2, mp[x]);
    }
  }
  if (find(n + 1) == find(n + 2)) {
    puts("NO");
  } else {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      printf("%d ", find(i) == find(n + 1));
    }
    putchar(10);
  }
  return 0;
}
