#include <bits/stdc++.h>
using namespace std;
struct disjoint_set {
  int P[100005];
  void join(int x, int y) { P[at(x)] = at(y); }
  int at(int u) { return u == P[u] ? u : P[u] = at(P[u]); }
  disjoint_set() {
    for (int i = 0; i < 100005; i++) P[i] = i;
  }
} Label;
int n, a[100005], A, B;
bool NotA[100005], NotB[100005], Impossible = false;
map<int, int> Map;
int main() {
  scanf("%d%d%d", &n, &A, &B);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    Map[a[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (!Map.count(A - a[i]))
      NotA[i] = true;
    else
      Label.join(i, Map[A - a[i]]);
    if (!Map.count(B - a[i]))
      NotB[i] = true;
    else
      Label.join(i, Map[B - a[i]]);
  }
  for (int i = 1; i <= n; i++) {
    NotA[Label.at(i)] |= NotA[i];
    NotB[Label.at(i)] |= NotB[i];
  }
  for (int i = 1; i <= n; i++) {
    NotA[i] = NotA[Label.at(i)];
    NotB[i] = NotB[Label.at(i)];
    if (NotA[i] && NotB[i]) Impossible = true;
  }
  if (Impossible)
    printf("NO\n");
  else {
    cout << "YES" << endl;
    for (int i = 1; i <= n; i++) printf(i == n ? "%d\n" : "%d ", int(NotA[i]));
  }
}
