#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int x[N], fa[N];
int a, b, n;
int ans[N];
map<int, int> m;
int Find(int x) { return fa[x] == x ? x : fa[x] = Find(fa[x]); }
int main() {
  scanf("%d%d%d", &n, &a, &b);
  memset(ans, -1, sizeof(ans));
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x[i]);
    m[x[i]] = i;
    fa[i] = i;
  }
  fa[n + 1] = n + 1;
  for (int i = 1; i <= n; i++) {
    int w = Find(i);
    if (m[a - x[i]] != 0) {
      fa[w] = Find(m[a - x[i]]);
    } else {
      fa[w] = Find(0);
    }
    if (m[b - x[i]] != 0) {
      fa[Find(i)] = Find(m[b - x[i]]);
    } else {
      fa[Find(i)] = Find(n + 1);
    }
  }
  if (Find(0) == Find(n + 1)) {
    printf("NO\n");
    return 0;
  }
  int wx = Find(n + 1);
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d ", Find(i) == wx ? 0 : 1);
}
