#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 2e5 + 5;
bool vis[MAX_N];
int color[MAX_N], val[MAX_N];
vector<int> order, g[MAX_N], gt[MAX_N];
bool ass[MAX_N];
int n, a, b;
void dfs(int x) {
  vis[x] = 1;
  for (int v : g[x])
    if (not vis[v]) dfs(v);
  order.emplace_back(x);
}
void dfsT(int x, int c) {
  color[x] = c;
  for (int v : gt[x])
    if (not color[v]) dfsT(v, c);
}
bool solve() {
  for (int i = 0; i < n; ++i)
    if (not vis[i]) dfs(i);
  reverse(order.begin(), order.end());
  int T = 1;
  for (int i = 0; i < n; ++i)
    if (not color[order[i]]) dfsT(order[i], T++);
  for (int i = 0; i < n; i += 2) {
    if (color[i] == color[i | 1]) return false;
    ass[i >> 1] = color[i] > color[i | 1];
  }
  return true;
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  map<int, int> id;
  for (int i = 0; i < n; ++i) {
    scanf("%d", val + i);
    id[val[i]] = 2 * i;
  }
  bool ok = 1;
  for (auto x : id) {
    if (id.count(a - x.first)) {
      int u = x.second, v = id[a - x.first];
      g[u].push_back(v);
      gt[v].push_back(u);
      g[v | 1].push_back(u | 1);
      gt[u | 1].push_back(v | 1);
    } else {
      int u = x.second;
      g[u].push_back(u | 1);
      gt[u | 1].push_back(u);
    }
    if (id.count(b - x.first)) {
      int u = x.second, v = id[b - x.first];
      g[u | 1].push_back(v | 1);
      gt[v | 1].push_back(u | 1);
      g[v].push_back(u);
      gt[u].push_back(v);
    } else {
      int u = x.second;
      gt[u].push_back(u | 1);
      g[u | 1].push_back(u);
    }
  }
  n <<= 1;
  if (solve()) {
    bool ok = 1;
    if (ok) {
      puts("YES");
      for (int i = 0; i < n / 2; ++i) {
        printf("%d ", ass[i] ^ 1);
      }
      puts("");
      return 0;
    }
  }
  puts("NO");
  return 0;
}
