#include <bits/stdc++.h>
using namespace std;
const int D = 1000000007;
int n, a, b;
map<int, int> m;
int main() {
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    m[t] = i;
  }
  vector<int> v(n, -1);
  bool swaped = false;
  if (a > b) {
    swaped = true;
    std::swap(a, b);
  }
  while (!m.empty()) {
    map<int, int>::iterator it = m.end();
    --it;
    int value = it->first;
    int index = it->second;
    if (m.find(a - value) != m.end()) {
      v[m[a - value]] = 0;
      v[m[value]] = 0;
      m.erase(value);
      m.erase(a - value);
      continue;
    }
    if (m.find(b - value) != m.end()) {
      v[m[b - value]] = 1;
      v[m[value]] = 1;
      m.erase(value);
      m.erase(b - value);
      continue;
    }
    printf("NO\n");
    return 0;
  }
  cout << "YES" << endl;
  if (!swaped)
    for (int i = 0; i < n; ++i) {
      printf("%d ", v[i]);
    }
  else
    for (int i = 0; i < n; ++i) {
      printf("%d ", 1 - v[i]);
    }
  printf("\n");
  return 0;
}
