#include <bits/stdc++.h>
using namespace std;
template <class t>
t abs2(const t &x) {
  return (x < 0 ? -x : x);
}
template <class t>
t max2(const t &x, const t &y) {
  return (x > y ? x : y);
}
template <class t>
t min2(const t &x, const t &y) {
  return (x < y ? x : y);
}
template <class t>
t gcd(const t &x, const t &y) {
  return x ? gcd(y % x, x) : y;
}
map<int, int> h;
int n, a, b, f[100005], v[100005], s[100005], p[100005];
int find(int x) { return f[x] == x ? x : f[x] = find(f[x]); }
int main() {
  cin >> n >> a >> b;
  for (int i = 1; i <= n; i++) {
    s[i] = 3;
    cin >> p[i];
    h[p[i]] = i;
    f[i] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (h.count(a - p[i])) f[find(h[a - p[i]])] = find(i), v[i] |= 1;
    if (h.count(b - p[i])) f[find(h[b - p[i]])] = find(i), v[i] |= 2;
  }
  for (int i = 1; i <= n; i++) s[find(i)] &= v[i];
  for (int i = 1; i <= n; i++) {
    if (s[i] == 0) {
      cout << "NO" << endl;
      return 0;
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    int st = s[find(i)];
    putchar('0' + ((st & 1) == 0));
    if (i != n) putchar(' ');
  }
  cout << endl;
  return 0;
}
