#include <bits/stdc++.h>
using namespace std;
const int maxn = 100000;
map<int, int> pos;
int v[maxn];
int parent[maxn];
pair<bool, bool> value[maxn];
int Rank[maxn];
int getparent(int i) {
  if (parent[i] != i) parent[i] = getparent(parent[i]);
  return parent[i];
}
void unite(int a, int b) {
  a = getparent(a);
  b = getparent(b);
  if (a == b) return;
  if (Rank[a] < Rank[b]) swap(a, b);
  if (Rank[a] == Rank[b]) Rank[a]++;
  parent[b] = a;
  value[a].first &= value[b].first;
  value[a].second &= value[b].second;
}
int main() {
  int n;
  int a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    int k;
    cin >> k;
    pos[k] = i;
    v[i] = k;
    Rank[i] = 0;
    parent[i] = i;
  }
  for (int i = 0; i < n; i++) {
    value[i] = make_pair(true, true);
    if (pos.count(a - v[i]) == 0) value[i].first = false;
    if (pos.count(b - v[i]) == 0) value[i].second = false;
  }
  for (int i = 0; i < n; i++) {
    if (pos.count((a - v[i])) != 0) unite(i, pos[a - v[i]]);
    if (pos.count((b - v[i])) != 0) unite(i, pos[b - v[i]]);
  }
  for (int i = 0; i < n; i++) {
    int j = getparent(i);
    if (value[j].first == false)
      if (value[j].second == false) {
        cout << "NO\n";
        return 0;
      }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    int j = getparent(i);
    if (value[j].first == true)
      cout << "0 ";
    else
      cout << "1 ";
  }
  return 0;
}
