#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > v;
int belong[100000];
int main() {
  int N, A, B;
  cin >> N >> A >> B;
  for (int i = 0; i < N; i++) {
    int a;
    cin >> a;
    v.push_back(make_pair(a, i));
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < N; i++) belong[i] = -1;
  bool ok = true;
  for (int i = 0; i < N; i++)
    if (belong[v[i].second] == -1) {
      int index1 = -1;
      int index2 = -1;
      int x = lower_bound(v.begin(), v.end(), make_pair(A - v[i].first, 0)) -
              v.begin();
      if (x < N && v[x].first == A - v[i].first && belong[v[x].second] == -1)
        index1 = x;
      x = lower_bound(v.begin(), v.end(), make_pair(B - v[i].first, 0)) -
          v.begin();
      if (x < N && v[x].first == B - v[i].first && belong[v[x].second] == -1)
        index2 = x;
      if (index1 == -1 && index2 == -1) {
        ok = false;
        break;
      }
      int index, b;
      if (index1 > index2) {
        index = index1;
        b = 0;
      } else {
        index = index2;
        b = 1;
      }
      belong[v[i].second] = b;
      belong[v[index].second] = b;
    }
  if (!ok)
    cout << "NO\n";
  else {
    cout << "YES\n";
    for (int i = 0; i < N; i++) cout << belong[i] << " ";
    cout << "\n";
  }
  return 0;
}
