#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:256000000")
template <class T>
T sqr(T a) {
  return a * a;
}
int n, ar[2];
int a[100001];
int ot[100001];
map<int, int> id;
void init() {
  scanf("%d %d %d", &n, &ar[0], &ar[1]);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i]);
    id[a[i]] = i;
  }
}
int find(int x) {
  if (id.find(x) == id.end()) return -1;
  return id[x];
}
int fun(int x, int a) {
  if (find(x) == -1) return 1;
  if (ar[a] - x == x) return 1;
  if (find(ar[a] - x) == -1) return 0;
  return fun(ar[1 ^ a] - ar[a] + x, a);
}
void fun1(int x, int a) {
  if (find(x) == -1) return;
  ot[find(x)] = a;
  ot[find(ar[a] - x)] = a;
  if (ar[a] - x == x) return;
  fun1(ar[a ^ 1] - ar[a] + x, a);
}
void solve() {
  memset(ot, -1, sizeof(ot));
  if (ar[0] == ar[1]) {
    for (int i = 0; i < n; ++i) {
      if (ot[i] != -1) continue;
      if (find(ar[0] - a[i]) == -1) {
        printf("NO");
        return;
      }
      ot[i] = 0;
      ot[find(ar[0] - a[i])] = 0;
    }
  } else
    for (int i = 0; i < n; ++i) {
      if (ot[i] != -1) continue;
      int l = fun(a[i], 0);
      int l1 = fun(ar[1] - a[i], 0);
      if (l & l1) {
        fun1(a[i], 0);
        fun1(ar[1] - a[i], 0);
        continue;
      }
      l = fun(a[i], 1);
      l1 = fun(ar[0] - a[i], 1);
      if (l & l1) {
        fun1(a[i], 1);
        fun1(ar[0] - a[i], 1);
        continue;
      }
      printf("NO");
      return;
    }
  printf("YES\n");
  for (int i = 0; i < n; ++i) printf("%d ", ot[i]);
}
int main() {
  init();
  solve();
  return 0;
}
