#include <bits/stdc++.h>
using namespace std;
struct twoSAT {
  struct Edge {
    int to, next;
  } E[400005];
  int n;
  bool vis[100005 << 1];
  int head[100005 << 1], cnt;
  int S[100005 << 1], c;
  void init(int n) {
    this->n = n;
    for (int i = 0; i < n * 2; i++) {
      head[i] = -1;
      vis[i] = 0;
    }
    cnt = 0;
  }
  void addedge(int u, int v) {
    E[cnt].to = v;
    E[cnt].next = head[u];
    head[u] = cnt++;
  }
  bool dfs(int u) {
    if (vis[u ^ 1]) return 0;
    if (vis[u]) return 1;
    vis[u] = 1;
    S[c++] = u;
    for (int i = head[u]; ~i; i = E[i].next) {
      int v = E[i].to;
      if (!dfs(v)) return 0;
    }
    return 1;
  }
  bool solve() {
    for (int i = 0; i < n * 2; i += 2) {
      if (!vis[i] && !vis[i ^ 1]) {
        c = 0;
        if (!dfs(i)) {
          while (c) vis[S[--c]] = 0;
          if (!dfs(i + 1)) return 0;
        }
      }
    }
    return 1;
  }
} S;
map<int, int> M;
int p[100005];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i]);
    M[p[i]] = i;
  }
  S.init(n);
  for (int u = 0; u < n; u++) {
    if (M.count(a - p[u])) {
      int v = M[a - p[u]];
      S.addedge(2 * u, 2 * v);
      S.addedge(2 * v + 1, 2 * u + 1);
    } else
      S.addedge(2 * u, 2 * u + 1);
    if (M.count(b - p[u])) {
      int v = M[b - p[u]];
      S.addedge(2 * u + 1, 2 * v + 1);
      S.addedge(2 * v, 2 * u);
    } else
      S.addedge(2 * u + 1, 2 * u);
  }
  if (S.solve()) {
    puts("YES");
    for (int i = 0; i < 2 * n; i += 2) {
      if (S.vis[i])
        printf("0 ");
      else
        printf("1 ");
    }
    puts("");
  } else
    puts("NO");
  return 0;
}
