#include <bits/stdc++.h>
using namespace std;
const int N = 101000;
map<int, int> hs;
int vis[N], way[N], A[N], B[N], p[N];
int n, a, b;
bool check0() {
  for (int i = 0; i < n; i++)
    if (!hs.count(a - p[i])) return 0;
  return 1;
}
int dfs(int u, int p, int s) {
  vis[u] = 1;
  way[u] = s;
  if (p == 0) {
    if (A[u] == u) return 1;
    if (A[u] == -1) return s;
    dfs(A[u], p ^ 1, s);
  } else {
    if (B[u] == u) return 1;
    if (B[u] == -1) return s ^ 1;
    dfs(B[u], p ^ 1, s);
  }
}
bool check1() {
  for (int i = 0; i < n; i++)
    if (!vis[i]) {
      if (A[i] == i || B[i] == i) continue;
      if (((A[i] == -1) ^ (B[i] == -1)) == 0) continue;
      if (dfs(i, A[i] == -1, A[i] == -1) == 0) return 0;
    }
  for (int i = 0; i < n; i++)
    if (!vis[i]) {
      if (A[i] == i)
        vis[i] = 1, way[i] = 0;
      else if (B[i] == i)
        vis[i] = 1, way[i] = 1;
    }
  for (int i = 0; i < n; i++)
    if (!vis[i]) return 0;
  return 1;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; i++) {
    scanf("%d", p + i);
    hs[p[i]] = i;
  }
  if (a == b) {
    if (check0()) {
      puts("YES");
      for (int i = 0; i < n; i++) {
        putchar('0');
        if (i != n - 1) putchar(' ');
      }
      puts("");
    } else
      puts("NO");
  } else {
    for (int i = 0; i < n; i++) {
      if (hs.count(a - p[i]))
        A[i] = hs[a - p[i]];
      else
        A[i] = -1;
      if (hs.count(b - p[i]))
        B[i] = hs[b - p[i]];
      else
        B[i] = -1;
    }
    if (check1()) {
      puts("YES");
      for (int i = 0; i < n; i++) {
        putchar(way[i] + '0');
        if (i != n - 1) putchar(' ');
      }
      puts("");
    } else
      puts("NO");
  }
}
