#include <bits/stdc++.h>
using namespace std;
const int MX = 100000 + 10;
int n, a, b;
int arr[MX], place[MX];
vector<int> adj[MX], q;
map<int, bool> av;
map<int, int> mp;
bool mark[MX], am[MX], bm[MX], flaga, flagb;
void DFS(int v) {
  mark[v] = true;
  q.push_back(v);
  if (!bm[v]) flaga = true;
  if (!am[v]) flagb = true;
  for (int i = 0; i < (int)adj[v].size(); i++)
    if (!mark[adj[v][i]]) DFS(adj[v][i]);
  return;
}
void DFS_ALL() {
  for (int i = 0; i < n; i++) {
    flaga = false;
    flagb = false;
    q.clear();
    if (!mark[i]) DFS(i);
    if (flaga && flagb) {
      printf("NO\n");
      return;
    }
    if (flaga)
      for (int i = 0; i < (int)q.size(); i++) place[q[i]] = 0;
    else
      for (int i = 0; i < (int)q.size(); i++) place[q[i]] = 1;
  }
  return;
}
int main() {
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    scanf("%d", &arr[i]);
    mp[arr[i]] = i;
    av[arr[i]] = true;
  }
  for (int i = 0; i < n; i++) {
    if (a - arr[i] >= 0 && av[a - arr[i]] == true) {
      adj[i].push_back(mp[a - arr[i]]);
      am[i] = true;
    }
    if (b - arr[i] >= 0 && av[b - arr[i]] == true) {
      adj[i].push_back(mp[b - arr[i]]);
      bm[i] = true;
    }
  }
  DFS_ALL();
  if (!(flaga && flagb)) {
    printf("YES\n");
    for (int i = 0; i < n; i++) {
      printf("%d ", place[i]);
    }
    printf("\n");
  }
  return 0;
}
