#include <bits/stdc++.h>
using namespace std;
map<int, int> Index;
int par[100005], n, a, b, p[100005];
bool can[100005][2], sta[100005][2];
int find(int x) {
  if (par[x] != x) par[x] = find(par[x]);
  return par[x];
}
void merge(int x, int y) { par[find(y)] = find(x); }
int main() {
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    cin >> p[i];
    Index[p[i]] = i;
    par[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (Index[a - p[i]]) {
      merge(Index[a - p[i]], i);
      can[i][0] = true;
    }
    if (Index[b - p[i]]) {
      merge(Index[b - p[i]], i);
      can[i][1] = true;
    }
  }
  for (int i = 1; i <= n; i++) sta[i][0] = sta[i][1] = true;
  for (int i = 1; i <= n; i++) {
    sta[find(i)][0] &= can[i][0];
    sta[find(i)][1] &= can[i][1];
  }
  for (int i = 1; i <= n; i++)
    if (!sta[find(i)][0] && !sta[find(i)][1]) {
      cout << "NO\n";
      return 0;
    }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    if (sta[find(i)][0])
      cout << 0;
    else
      cout << 1;
    cout << (i == n ? "\n" : " ");
  }
  return 0;
}
