#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
const int inf = 0x3f3f3f3f;
const int mod = 998244353;
map<int, int> mp;
int x[N], fa[N];
int n, a, b;
int get(int x) { return x == fa[x] ? x : fa[x] = get(fa[x]); }
void merge(int x, int y) { fa[get(x)] = get(y); }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b;
  for (int i = 0; i <= n + 3; i++) fa[i] = i;
  for (int i = 1; i <= n; i++) {
    cin >> x[i];
    mp[x[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (mp.find(a - x[i]) != mp.end())
      merge(i, mp[a - x[i]]);
    else
      merge(i, n + 1);
    if (mp.find(b - x[i]) != mp.end())
      merge(i, mp[b - x[i]]);
    else
      merge(i, n + 2);
  }
  if (get(n + 1) == get(n + 2))
    cout << "NO" << '\n';
  else {
    cout << "YES" << '\n';
    for (int i = 1; i <= n; i++) {
      if (get(i) == get(n + 1))
        cout << "1 ";
      else
        cout << "0 ";
    }
    cout << '\n';
  }
  return 0;
}
