#include <bits/stdc++.h>
using namespace std;
const int TAM = 100100;
int a[TAM], n;
vector<int> adj[TAM], adjT[TAM];
unordered_map<int, int> id;
int ans[TAM];
bool seen[TAM];
bool can(int i, bool flag) {
  if (seen[i]) return false;
  seen[i] = true;
  bool last = true;
  for (int j : adj[i]) last &= seen[j];
  if (last) return flag;
  for (int j = 0; j < int(adj[i].size()); ++j)
    if (can(adj[i][j], !flag)) {
      if (!flag) ans[i] = ans[adj[i][j]] = adjT[i][j];
      return true;
    }
  seen[i] = false;
  return false;
}
bool solve() {
  for (int i = 0; i < n; ++i)
    if (!seen[i] && adj[i].size() == 1)
      if (!can(i, false)) return false;
  for (int i = 0; i < n; ++i)
    if (!seen[i])
      if (!can(i, false)) return false;
  return true;
}
int getId(int i) {
  if (id.count(i) == 0) return -1;
  return id[i];
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int I[2];
  cin >> n >> I[0] >> I[1];
  for (int i = 0; i < n; ++i) {
    cin >> a[i];
    id[a[i]] = i;
  }
  for (int b = 0; b < 2; ++b)
    for (int i = 0; i < n; ++i)
      if (I[b] - a[i] != a[i] && getId(I[b] - a[i]) != -1) {
        adj[i].push_back(getId(I[b] - a[i]));
        adjT[i].push_back(b);
      }
  int iMid[2];
  for (int b = 0; b < 2; ++b) {
    if (I[b] % 2 == 0)
      iMid[b] = getId(I[b] / 2);
    else
      iMid[b] = -1;
  }
  for (int i = 0; i < 4; ++i) {
    memset(ans, -1, sizeof(ans));
    memset(seen, false, sizeof(seen));
    for (int b = 0; b < 2; ++b) {
      if (((i >> b) & 1) > 0)
        if (iMid[b] != -1) {
          seen[iMid[b]] = true;
          ans[iMid[b]] = b;
        }
    }
    if (solve()) {
      cout << "YES\n";
      cout << ans[0];
      for (int j = 1; j < n; ++j) cout << ' ' << ans[j];
      cout << '\n';
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
