#include <bits/stdc++.h>
using namespace std;
vector<int> edge[200010];
int n;
int dis[200010], Q[200010], parent[200010], L[200010], R[200010];
bool dfs(int i) {
  int len = edge[i].size();
  for (int j = 0; j < len; j++) {
    int x = edge[i][j];
    if (L[x] == -1 || (parent[L[x]] == i)) {
      if (L[x] == -1 || dfs(L[x])) {
        L[x] = i;
        R[i] = x;
        return (true);
      }
    }
  }
  return false;
}
bool bfs() {
  int x, f = 0, l = 0;
  memset(dis, -1, sizeof(dis));
  for (int i = 1; i <= n; i++) {
    if (R[i] == -1) {
      Q[l++] = i;
      dis[i] = 0;
    }
  }
  while (f < l) {
    int i = Q[f++];
    int len = edge[i].size();
    for (int j = 0; j < len; j++) {
      x = edge[i][j];
      if (L[x] == -1)
        return true;
      else if (dis[L[x]] == -1) {
        parent[L[x]] = i;
        dis[L[x]] = dis[i] + 1;
        Q[l++] = L[x];
      }
    }
  }
  return false;
}
int hopcroft_karp() {
  int counter = 0;
  memset(L, -1, sizeof(L));
  memset(R, -1, sizeof(R));
  while (bfs()) {
    for (int i = 1; i <= n; i++) {
      if (R[i] == -1 && dfs(i)) counter++;
    }
  }
  return counter;
}
int ara[100005], ans[100005], vis[100005];
int main() {
  int a, b;
  map<int, int> make_pair;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &ara[i]);
    make_pair[ara[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    int u = i;
    int v = a - ara[i];
    if (make_pair.count(v)) {
      v = make_pair[v];
      edge[u].push_back(v);
    }
    v = b - ara[i];
    if (make_pair.count(v)) {
      v = make_pair[v];
      edge[u].push_back(v);
    }
  }
  int match = hopcroft_karp();
  if (match != n) {
    printf("NO\n");
  } else {
    printf("YES\n");
    for (int i = 1; i <= n; i++) {
      int u = i;
      int v = L[u];
      if (vis[u] == 0) {
        vis[v] = vis[u] = 1;
        if (ara[u] == b - ara[v]) {
          ans[u] = ans[v] = 1;
        }
      }
    }
    for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  }
  return 0;
}
