#include <bits/stdc++.h>
using namespace std;
const int N = 200000;
int us[N], ans[N], a[N];
map<int, int> mp;
int A, B;
void paint(int i, int col) {
  if (us[i]) return;
  us[i] = 1;
  ans[i] = col;
  if (mp.find(A - a[i]) != mp.end()) paint(mp[A - a[i]], col);
  if (mp.find(B - a[i]) != mp.end()) paint(mp[B - a[i]], col);
}
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n >> A >> B;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    mp[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (mp.find(A - a[i]) == mp.end() && mp.find(B - a[i]) == mp.end()) {
      cout << "NO\n";
      return 0;
    }
    if (us[i]) continue;
    if (mp.find(A - a[i]) == mp.end() && mp.find(B - a[i]) != mp.end()) {
      paint(i, 1);
    } else if (mp.find(A - a[i]) == mp.end() && mp.find(B - a[i]) != mp.end()) {
      paint(i, 0);
    }
  }
  ans[0] = -228;
  for (int i = 1; i <= n; i++) {
    if (ans[i] == 0) {
      if (ans[mp[A - a[i]]] != 0) {
        cout << "NO\n";
        return 0;
      }
    } else {
      if (ans[mp[B - a[i]]] != 1) {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
