#include <bits/stdc++.h>
using namespace std;
map<int, int> s, ss;
int main() {
  int n, a, b, i, k = 0;
  int x[100005], y[100005];
  scanf("%d%d%d", &n, &a, &b);
  for (i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    s[x[i]] = 1;
  }
  for (i = 0; i < n; i++) {
    if (s[a - x[i]] != 1)
      y[k++] = x[i];
    else
      ss[x[i]] = 1;
  }
  for (i = 0; i < k; i++) {
    if (s[b - y[i]] == 1) {
      if (ss[b - y[i]] == 1) {
        y[k++] = a - b + y[i];
      }
      ss[y[i]] = ss[b - y[i]] = 2;
    } else
      break;
  }
  if (i == k) {
    printf("YES\n");
    for (i = 0; i < n - 1; i++) {
      printf("%d ", ss[x[i]] - 1);
    }
    printf("%d\n", ss[x[i]] - 1);
  } else
    printf("NO\n");
  return 0;
}
