#include <bits/stdc++.h>
using namespace std;
const int INF = 1e8;
const int maxn = 1e5 + 10, mod = 1000007;
const double eps = 1e-12;
const long double PI = acos(0.0) * 2.0;
int n, a, b;
int p[maxn];
map<int, int> id;
int pa[maxn];
set<int> s;
bool no[maxn][2];
int find(int x) { return x == pa[x] ? x : pa[x] = find(pa[x]); }
void add(int i) {
  int r1 = a - p[i], r2 = b - p[i];
  if (id.count(r1)) {
    int u = i, v = id[r1];
    int pu = find(u), pv = find(v);
    pa[pu] = pv;
  }
  if (id.count(r2)) {
    int u = i, v = id[r2];
    int pu = find(u), pv = find(v);
    pa[pu] = pv;
  }
}
int main() {
  cin >> n >> a >> b;
  for (int t = (1); t < (n + 1); ++t)
    scanf("%d", p + t), id[p[t]] = t, s.insert(p[t]);
  memset(no, 0, sizeof(no));
  for (int t = (1); t < (n + 1); ++t) pa[t] = t;
  for (int t = (1); t < (n + 1); ++t) add(t);
  for (int t = (1); t < (n + 1); ++t) {
    int& c = p[t];
    if (!s.count(a - c) && !s.count(b - c)) {
      puts("NO");
      return 0;
    }
    if (!s.count(a - c)) {
      int pt = find(t);
      no[pt][0] = 1;
      if (no[pt][1]) {
        puts("NO");
        return 0;
      }
    }
    if (!s.count(b - c)) {
      int pt = find(t);
      no[pt][1] = 1;
      if (no[pt][0]) {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  for (int t = (1); t < (n + 1); ++t) {
    if (no[find(t)][0])
      printf("1 ");
    else
      printf("0 ");
  }
}
