#include <bits/stdc++.h>
using namespace std;
int n;
int par[100010], high[100010], num[100010];
map<int, int> mp;
void init() {
  for (int i = 0; i <= n + 1; i++) {
    par[i] = i;
    high[i] = 0;
  }
}
int find(int x) {
  if (par[x] == x) return x;
  return par[x] = find(par[x]);
}
void unite(int x, int y) {
  x = find(x);
  y = find(y);
  if (x == y) return;
  if (high[x] < high[y])
    par[x] = y;
  else {
    par[y] = x;
    if (high[x] == high[y]) high[x]++;
  }
}
bool same(int x, int y) { return find(x) == find(y); }
int main() {
  int a, b, MAX = -1;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 2; i <= n + 1; i++) {
    scanf("%d", &num[i]);
    MAX = max(MAX, num[i]);
    mp[num[i]] = i;
  }
  if (MAX >= max(a, b)) {
    printf("NO\n");
    return 0;
  }
  init();
  for (int i = 2; i <= n + 1; i++) {
    if (mp[b - num[i]])
      unite(i, mp[b - num[i]]);
    else
      unite(i, 0);
    if (mp[a - num[i]])
      unite(i, mp[a - num[i]]);
    else
      unite(i, 1);
  }
  if (find(0) == find(1))
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 2; i <= n + 1; i++) {
      if (find(i) == find(0))
        printf("0");
      else
        printf("1");
      if (i != n + 1) printf(" ");
    }
    printf("\n");
  }
  return 0;
}
