#include <bits/stdc++.h>
using namespace std;
const int N = 1e+5 + 10;
pair<int, int> arr[N];
int vis[N];
int Bin(int l, int r, int key) {
  while (l <= r) {
    int m = l + (r - l) / 2;
    if (arr[m].first == key)
      return arr[m].second;
    else if (arr[m].first < key)
      l = m + 1;
    else
      r = m - 1;
  }
  return -1;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, a, b;
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++i) {
    int num;
    cin >> num;
    arr[i] = make_pair(num, i);
    vis[i] = -1;
  }
  sort(arr, arr + n);
  bool ans = true;
  int v_min = min(a, b), v_max = max(a, b);
  for (int i = n - 1; i >= 0 && ans; --i) {
    if (vis[arr[i].second] != -1) continue;
    if (arr[i].first >= v_max)
      ans = false;
    else if (arr[i].first >= v_min) {
      int pos = Bin(0, i, v_max - arr[i].first);
      if (pos == -1 || vis[pos] != -1)
        ans = false;
      else
        vis[pos] = vis[arr[i].second] = b == v_max;
    } else {
      int pos = Bin(0, i, v_min - arr[i].first);
      if (pos == -1 || vis[pos] != -1) {
        pos = Bin(0, i, v_max - arr[i].first);
        if (pos == -1 || vis[pos] != -1)
          ans = false;
        else
          vis[pos] = vis[arr[i].second] = b == v_max;
      } else
        vis[pos] = vis[arr[i].second] = b == v_min;
    }
  }
  cout << (ans ? "YES" : "NO") << endl;
  if (ans) {
    for (int i = 0; i < n; ++i) cout << vis[i] << (i == n - 1 ? "\n" : " ");
  }
  return 0;
}
