#include <bits/stdc++.h>
using namespace std;
template <class T>
T f_max(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T f_min(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T f_abs(T a) {
  return a > 0 ? a : -a;
}
map<int, int> mp;
int par[100005], vs[100005], sta[100005];
int x[100005];
int find(int x) {
  if (par[x] == x) return x;
  return par[x] = find(par[x]);
}
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++)
    scanf("%d", &x[i]), mp[x[i]] = i, vs[i] = 0, sta[i] = 3, par[i] = i;
  for (int i = 1; i <= n; i++) {
    if (mp.count(a - x[i])) par[find(mp[a - x[i]])] = find(i), vs[i] |= 1;
    if (mp.count(b - x[i])) par[find(mp[b - x[i]])] = find(i), vs[i] |= 2;
  }
  for (int i = 1; i <= n; i++) sta[find(i)] &= vs[i];
  for (int i = 1; i <= n; i++)
    if (sta[find(i)] == 0) {
      printf("NO\n");
      return 0;
    }
  printf("YES\n");
  for (int i = 1; i <= n; i++) {
    int s = sta[find(i)];
    if ((s & 1) == 0)
      printf("1");
    else
      printf("0");
    if (i != n) printf(" ");
  }
  printf("\n");
  return 0;
}
