#include <bits/stdc++.h>
using namespace std;
int u[100050];
int v[100050];
int a, b;
int n;
int find(int x) {
  if (x == u[x])
    return x;
  else
    return u[x] = find(u[x]);
}
void Union(int x, int y) {
  x = find(x);
  y = find(y);
  u[x] = y;
  return;
}
int main() {
  while (~scanf("%d", &n)) {
    scanf("%d%d", &a, &b);
    map<int, int> mp;
    for (int i = 1; i <= n; i++) {
      u[i] = i;
      scanf("%d", &v[i]);
      mp[v[i]] = i;
    }
    u[n + 1] = n + 1;
    u[n + 2] = n + 2;
    for (int i = 1; i <= n; i++) {
      if (mp[a - v[i]] != 0) {
        Union(mp[a - v[i]], i);
      } else
        Union(i, n + 2);
      if (mp[b - v[i]] != 0) {
        Union(mp[b - v[i]], i);
      } else
        Union(i, n + 1);
    }
    if (find(n + 1) == find(n + 2))
      printf("NO\n");
    else {
      printf("YES\n");
      for (int i = 1; i <= n; i++) {
        if (find(i) == find(n + 1))
          printf("0%c", i == n ? '\n' : ' ');
        else
          printf("1%c", i == n ? '\n' : ' ');
      }
    }
  }
  return 0;
}
