#include <bits/stdc++.h>
using namespace std;
const int maxn = 200005;
int n, a, b;
map<int, int> num;
int bel[maxn], ax[maxn], bx[maxn], seq[maxn];
void bad() {
  printf("NO\n");
  exit(0);
}
void dfs(int x) {
  if (bel[ax[x]] != -1 && bel[bx[x]] != -1) bad();
  if (bel[ax[x]] == -1) {
    bel[x] = bel[ax[x]] = 0;
    if (bel[bx[ax[x]]] == -1) dfs(bx[ax[x]]);
  } else {
    bel[x] = bel[bx[x]] = 1;
    if (bel[ax[bx[x]]] == -1) dfs(ax[bx[x]]);
  }
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &seq[i]);
    num[seq[i]] = i;
  }
  memset(bel, -1, sizeof(bel));
  for (int i = 1; i <= n; i++) {
    ax[i] = num.count(a - seq[i]) ? num[a - seq[i]] : 0;
    bx[i] = num.count(b - seq[i]) ? num[b - seq[i]] : 0;
  }
  bel[0] = 2;
  ax[0] = bx[0] = 0;
  for (int i = 1; i <= n; i++)
    if (bel[i] == -1) {
      if (bel[ax[i]] == -1 && bel[bx[i]] == -1) continue;
      dfs(i);
    }
  for (int i = 1; i <= n; i++)
    if (bel[i] == -1) bel[i] = 0;
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d ", bel[i]);
  return 0;
}
