#include <bits/stdc++.h>
using namespace std;
map<int, int> hs;
int n, a, b, p[100005], fa[100005], v[100005], sta[100005];
int Find(int x) { return fa[x] == x ? x : fa[x] = Find(fa[x]); }
int main() {
  int i, t;
  scanf("%d%d%d", &n, &a, &b);
  for (i = 1; i <= (n); i++) {
    scanf("%d", &p[i]);
    hs[p[i]] = i;
    fa[i] = i;
  }
  for (i = 1; i <= (n); i++) {
    if (hs.count(a - p[i])) fa[Find(hs[a - p[i]])] = Find(i), v[i] |= 1;
    if (hs.count(b - p[i])) fa[Find(hs[b - p[i]])] = Find(i), v[i] |= 2;
  }
  for (i = 1; i <= (n); i++) sta[i] = 3;
  for (i = 1; i <= (n); i++) sta[Find(i)] &= v[i];
  for (i = 1; i <= (n); i++) {
    if (sta[i] == 0) {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  for (i = 1; i <= (n); i++) {
    t = sta[Find(i)];
    putchar('0' + ((t & 1) == 0));
    if (i < n) putchar(' ');
  }
  puts("");
  return 0;
}
