#include <bits/stdc++.h>
using namespace std;
template <typename A, typename B>
inline bool mina(A &x, B y) {
  return (x > y) ? (x = y, 1) : 0;
}
template <typename A, typename B>
inline bool maxa(A &x, B y) {
  return (x < y) ? (x = y, 1) : 0;
}
int N, n;
int X, Y;
int A[(100005)];
int G[(100005)];
int E[(100005)][2];
int deg[(100005)];
map<int, int> M;
stack<int> S1, S2;
inline int ex(int a) { return M.find(a) != M.end(); }
void add(int i, int g) {
  ++n;
  G[i] = g;
  for (int _b = (2), j = (0); j < _b; ++j) {
    int ii = E[i][j];
    if (ii >= 0 && G[ii] == -1) {
      E[ii][j] = -1;
      --deg[ii];
      if (deg[ii] == 1) S1.push(ii);
    }
    E[i][j] = -1;
  }
  deg[i] = 0;
}
int main() {
  cin >> N >> X >> Y;
  for (int _b = (N), i = (0); i < _b; ++i) {
    scanf("%d", A + i);
    M[A[i]] = i;
  }
  if (X == Y) Y = 0;
  int yes = 1;
  for (int _b = (N), i = (0); i < _b; ++i) {
    G[i] = -1;
    int a = X - A[i];
    int b = Y - A[i];
    if (ex(a)) {
      ++deg[i];
      E[i][0] = M[a];
    } else
      E[i][0] = -1;
    if (ex(b)) {
      ++deg[i];
      E[i][1] = M[b];
    } else
      E[i][1] = -1;
    if (deg[i] == 0) {
      yes = 0;
      break;
    } else if (deg[i] == 1)
      S1.push(i);
    else
      S2.push(i);
  }
  n = 0;
  while (n < N && yes) {
    int a, b;
    if (S1.size() > 0) {
      a = S1.top();
      S1.pop();
      if (deg[a] != 1) continue;
      if (E[a][0] == a)
        add(a, 0);
      else if (E[a][1] == a)
        add(a, 1);
      else {
        for (int _b = (2), i = (0); i < _b; ++i)
          if (E[a][i] != -1) {
            b = E[a][i];
            add(a, i);
            add(b, i);
            break;
          }
      }
    } else if (S2.size() > 0) {
      a = S2.top();
      S2.pop();
      if (deg[a] != 2) continue;
      b = E[a][0];
      add(a, 0);
      add(b, 0);
    } else
      yes = 0;
  }
  if (yes) {
    printf("YES\n");
    for (int _b = (N), i = (0); i < _b; ++i) printf("%d ", G[i]);
    cout << endl;
  } else
    printf("NO\n");
  return 0;
}
