#include <bits/stdc++.h>
using namespace std;
const int N = 2e5 + 5;
unordered_map<int, int> mp;
int p[N];
int pre[N];
int find(int x) { return pre[x] == x ? x : pre[x] = find(pre[x]); }
void mix(int p1, int p2, int m) {
  if (mp[p1]) {
    int fa = find(mp[p1]);
    int fb = find(p2);
    pre[fb] = fa;
  } else {
    int fa = find(m);
    int fb = find(p2);
    pre[fb] = fa;
  }
}
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n + 2; i++) pre[i] = i;
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    mp[p[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    mix(a - p[i], i, n + 2);
    mix(b - p[i], i, n + 1);
  }
  int fx = find(n + 1);
  int fy = find(n + 2);
  if (fx == fy) {
    puts("NO");
  } else {
    puts("YES");
    for (int i = 1; i <= n; i++) {
      int x = find(i);
      printf("%d ", (x == fy));
    }
  }
}
