#include <bits/stdc++.h>
using namespace std;
template <class T>
bool Maximize(T &v, T nv) {
  if (nv > v) return v = nv, 1;
  return 0;
}
template <class T>
bool Minimize(T &v, T nv) {
  if (nv < v) return v = nv, 1;
  return 0;
}
template <class T>
T Mod(T &v, T mod) {
  return v = (v % mod + mod) % mod;
}
const long long INFLL = numeric_limits<long long>::max();
const long INF = numeric_limits<long>::max();
set<long> s;
map<long, bool> m;
long v[2];
void NO() {
  printf("NO\n");
  exit(0);
}
void go(long x) {
  if (s.find(x) == s.end()) return;
  bool ok[2];
  for (long z = 0; z < 2; ++z) ok[z] = s.find(v[z] - x) != s.end();
  if (!(ok[0] | ok[1])) NO();
  if (ok[0] && !ok[1])
    m[x] = m[v[0] - x] = 0, s.erase(x), s.erase(v[0] - x),
    go(v[1] - (v[0] - x));
  else if (ok[1] && !ok[0])
    m[x] = m[v[1] - x] = 1, s.erase(x), s.erase(v[1] - x),
    go(v[0] - (v[1] - x));
}
void solve() {
  long n;
  scanf("%ld %ld %ld", &n, v, v + 1);
  vector<long> a;
  a.reserve(n);
  for (long i = 0; i < n; ++i) {
    long x;
    scanf("%ld", &x);
    a.push_back(x);
    s.insert(x);
  }
  for (long i = 0; i < n; ++i) {
    go(a[i]);
  }
  printf("YES\n");
  for (long i = 0; i < n; ++i) {
    printf("%ld ", m.count(a[i]) ? m[a[i]] : 0);
  }
}
void init() {}
int main() {
  init();
  solve();
  return 0;
}
