#include <bits/stdc++.h>
using namespace std;
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
void check_time() {}
const int res = 1e5 + 10;
const long long int mod = 1e9 + 7;
int main() {
  int n, a, b, sum, total, ans, mark[res];
  map<int, int> id;
  set<int> st;
  int one = 1, zero = 0;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    int x;
    scanf("%d", &x);
    st.insert(x);
    id[x] = i;
  }
  if (a > b) {
    swap(a, b);
    swap(zero, one);
  }
  while (!st.empty()) {
    int start = *st.begin();
    if (st.count(b - start)) {
      st.erase(start);
      st.erase(b - start);
      mark[id[start]] = mark[id[b - start]] = one;
      continue;
    }
    if (st.count(a - start)) {
      st.erase(start);
      st.erase(a - start);
      mark[id[start]] = mark[id[a - start]] = zero;
      continue;
    }
    deb("NO");
    return 0;
  }
  deb("YES");
  for (int i = 1; i <= n; i++) {
    cout << mark[i] << " ";
  }
  return 0;
}
