#include <bits/stdc++.h>
using namespace std;
int n, a, b;
int c[100005];
int fa[100005];
map<int, int> mp;
void Init() {
  for (int i = 1; i <= n + 2; i++) fa[i] = i;
}
int findfa(int x) {
  if (fa[x] == x) return x;
  fa[x] = fa[fa[x]];
  return findfa(fa[x]);
}
void Unit(int x, int y) {
  x = findfa(x);
  y = findfa(y);
  if (x == y) return;
  fa[y] = x;
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &c[i]);
    mp[c[i]] = i;
  }
  Init();
  for (int i = 1; i <= n; i++) {
    if (mp[a - c[i]])
      Unit(mp[c[i]], mp[a - c[i]]);
    else
      Unit(mp[c[i]], n + 1);
    if (mp[b - c[i]])
      Unit(mp[c[i]], mp[b - c[i]]);
    else
      Unit(mp[c[i]], n + 2);
  }
  if (findfa(n + 1) == findfa(n + 2)) {
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) {
    if (findfa(mp[c[i]]) == findfa(n + 1))
      printf("1 ");
    else if (findfa(mp[c[i]]) == findfa(n + 2))
      printf("0 ");
    else
      printf("1 ");
  }
  return 0;
}
