#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e5 + 100;
int f[maxn], s[maxn];
int find_set(int x) { return x == f[x] ? x : f[x] = find_set(f[x]); }
void merge_set(int x, int y) {
  int fx = find_set(x);
  int fy = find_set(y);
  if (fx != fy) f[fx] = fy;
}
int main() {
  int n, a, b, x;
  scanf("%d%d%d", &n, &a, &b);
  map<int, int> M;
  for (int i = 1; i <= n + 2; i++) f[i] = i;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &s[i]);
    M[s[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    x = a - s[i];
    if (M[x] != 0)
      merge_set(i, M[x]);
    else
      merge_set(i, n + 2);
    x = b - s[i];
    if (M[x] != 0)
      merge_set(i, M[x]);
    else
      merge_set(i, n + 1);
  }
  int fx = find_set(n + 1);
  int fy = find_set(n + 2);
  if (fx == fy)
    puts("NO");
  else {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      int x = find_set(i);
      if (i == 1) {
        if (x == fx)
          printf("0");
        else
          printf("1");
      } else {
        if (x == fx)
          printf(" 0");
        else
          printf(" 1");
      }
    }
  }
  return 0;
}
