#include <bits/stdc++.h>
using namespace std;
int num[100003];
int father[100003];
map<int, int> hsh;
int n, a, b, f;
int findfather(int x) {
  if (father[x] == x)
    return x;
  else
    return father[x] = findfather(father[x]);
}
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &num[i]);
    hsh[num[i]] = i;
  }
  for (int i = 1; i <= n + 2; i++) father[i] = i;
  for (int i = 1; i <= n; i++) {
    if (hsh[a - num[i]] == 0)
      father[findfather(i)] = findfather(n + 2);
    else
      father[findfather(i)] = findfather(hsh[a - num[i]]);
    if (hsh[b - num[i]] == 0)
      father[findfather(i)] = findfather(n + 1);
    else
      father[findfather(i)] = findfather(hsh[b - num[i]]);
  }
  if (findfather(n + 1) == findfather(n + 2))
    printf("NO\n");
  else {
    printf("YES\n");
    for (int i = 1; i < n; i++)
      if (findfather(i) == findfather(n + 1))
        printf("0 ");
      else
        printf("1 ");
    if (findfather(n) == findfather(n + 1))
      printf("0\n");
    else
      printf("1\n");
  }
  return 0;
}
