#include <bits/stdc++.h>
const int N = 100500;
int n, a, b, p[N], arr[N];
int answer[N];
int find(int x) {
  int a = std::lower_bound(arr, arr + n, x) - arr;
  if (a >= n || arr[a] != x) return -1;
  return a;
}
void fail() {
  printf("NO\n");
  exit(0);
}
void start() {
  for (int i = 0; i < n; ++i) {
    if (answer[i] != 0) continue;
    int pa = find(a - arr[i]), pb = find(b - arr[i]);
    if (pa == -1 || answer[pa] != 0) {
      if (pb == -1 || answer[pb] != 0) return;
      answer[i] = answer[pb] = 2;
    } else {
      if (pb == -1 || answer[pb] != 0)
        answer[i] = answer[pa] = 1;
      else if (a < b)
        answer[i] = answer[pb] = 2;
      else
        answer[i] = answer[pa] = 1;
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; ++i) printf("%d ", answer[find(p[i])] - 1);
  printf("\n");
  exit(0);
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &p[i]);
    arr[i] = p[i];
    if (arr[i] >= std::max(a, b)) fail();
  }
  std::sort(arr, arr + n);
  if (a == b) {
    for (int i = 0; i < n; ++i)
      if (find(a - arr[i]) == -1) fail();
    printf("YES\n");
    for (int i = 0; i < n; ++i) printf("1 ");
    printf("\n");
    return 0;
  }
  start();
  int fa = find(a / 2), fb = find(b / 2);
  if (a % 2 == 0 && fa != -1) {
    memset(answer, 0, sizeof(answer));
    answer[fa] = 1;
    start();
  }
  if (b % 2 == 0 && fb != -1) {
    memset(answer, 0, sizeof(answer));
    answer[fb] = 2;
    start();
  }
  if (a % 2 == 0 && fa != -1 && b % 2 == 0 && fb != -1) {
    memset(answer, 0, sizeof(answer));
    answer[fa] = 1;
    answer[fb] = 2;
    start();
  }
  fail();
  return 0;
}
