#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 10;
bool mark[maxn];
int n, a, b, p[maxn], comp[maxn], ind;
vector<int> adj[maxn], jda[maxn], ord;
void dfs(int u) {
  mark[u] = true;
  for (int v : adj[u])
    if (!mark[v]) dfs(v);
  ord.push_back(u);
}
void sfd(int u) {
  comp[u] = ind;
  for (int v : jda[u])
    if (!comp[v]) sfd(v);
}
void add_edge(int u, int v) {
  adj[u].push_back(v);
  jda[v].push_back(u);
}
void add_clause(int u, int v) {
  add_edge(u ^ 1, v);
  add_edge(v ^ 1, u);
}
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> a >> b;
  map<int, int> idx;
  for (int i = 0; i < n; i++) cin >> p[i], idx[p[i]] = i;
  for (int i = 0; i < n; i++) {
    int pa = a - p[i], pb = b - p[i];
    if (idx.count(pa)) {
      int id = idx[pa];
      add_clause(2 * i, 2 * id + 1);
      add_clause(2 * i + 1, 2 * id);
    } else
      add_clause(2 * i + 1, 2 * i + 1);
    if (idx.count(pb)) {
      int id = idx[pb];
      add_clause(2 * i, 2 * id + 1);
      add_clause(2 * i + 1, 2 * id);
    } else
      add_clause(2 * i, 2 * i);
  }
  for (int i = 0; i < 2 * n; i++)
    if (!mark[i]) dfs(i);
  reverse(ord.begin(), ord.end());
  for (int u : ord)
    if (!comp[u]) ++ind, sfd(u);
  vector<int> ans;
  for (int i = 0; i < n; i++)
    if (comp[2 * i] == comp[2 * i + 1])
      return cout << "NO", 0;
    else if (comp[2 * i] > comp[2 * i + 1])
      ans.push_back(0);
    else
      ans.push_back(1);
  cout << "YES\n";
  for (int u : ans) cout << u << ' ';
  return 0;
}
