#include <bits/stdc++.h>
using namespace std;
const int LIM = 100003;
int p[LIM];
int find(int x) {
  if (p[x] == x)
    return x;
  else
    return (p[x] = find(p[x]));
}
int main() {
  int N, A[LIM], a, b;
  int setmask[LIM], final_mask[LIM];
  memset(setmask, 0, sizeof setmask);
  unordered_map<int, int> idx;
  cin >> N >> a >> b;
  for (int i = 0; i < N; i++) cin >> A[i], idx[A[i]] = i, p[i] = i;
  for (int i = 0; i < N; i++) {
    if (idx.find(a - A[i]) != idx.end())
      p[find(idx[a - A[i]])] = find(i), setmask[i] |= 1;
    if (idx.find(b - A[i]) != idx.end())
      p[find(idx[b - A[i]])] = find(i), setmask[i] |= 2;
  }
  putchar(10);
  for (int i = 0; i < N; i++) final_mask[i] = 3;
  for (int i = 0; i < N; i++) final_mask[find(i)] &= setmask[i];
  for (int i = 0; i < N; i++)
    if (!final_mask[i]) {
      puts("NO");
      return 0;
    }
  puts("YES");
  for (int i = 0; i < N; i++) {
    int st = final_mask[find(i)];
    putchar('0' + ((st & 1) == 0));
    putchar(' ');
  }
  putchar(10);
  return 0;
}
