#include <bits/stdc++.h>
using namespace std;
class sp {
 public:
  int q;
  bool w;
  sp *e;
  sp(int q1, bool w1, sp *e1) {
    q = q1;
    w = w1;
    e = e1;
  }
};
sp *a[100000];
int s[100000], s1[100000];
void qs(int q, int w) {
  int e = q, r = w, t = s[q + (rand() % (w - q + 1))], y;
  do {
    while (s[e] < t) e++;
    while (s[r] > t) r--;
    if (e <= r) {
      y = s[e];
      s[e] = s[r];
      s[r] = y;
      y = s1[e];
      s1[e] = s1[r];
      s1[r] = y;
      e++;
      r--;
    }
  } while (e <= r);
  if (q < r) qs(q, r);
  if (e < w) qs(e, w);
}
int main() {
  int q, w, e, r, t, y, u, c, v, d[100000], f[100000];
  bool g[100000];
  sp *c1;
  scanf("%d%d%d", &q, &y, &u);
  for (w = 0; w < q; w++) {
    scanf("%d", &s[w]);
    s1[w] = w;
    a[w] = 0;
    d[w] = 0;
  }
  qs(0, q - 1);
  for (w = 0; w < q; w++) {
    t = y - s[w];
    e = 0;
    for (c = 65536; c; c >>= 1) {
      v = e + c;
      if ((v < q) && (s[v] <= t)) e = v;
    }
    if (s[e] == t) {
      a[w] = new sp(e, 0, a[w]);
      d[e]++;
    }
    t = u - s[w];
    e = 0;
    for (c = 65536; c; c >>= 1) {
      v = e + c;
      if ((v < q) && (s[v] <= t)) e = v;
    }
    if (s[e] == t) {
      a[w] = new sp(e, 1, a[w]);
      d[e]++;
    }
  }
  r = 0;
  for (w = 0; w < q; w++) {
    if (d[w] == 0) {
      printf("NO");
      return 0;
    }
    if (d[w] == 1) {
      f[r] = w;
      r++;
    }
  }
  t = q;
  c = 0;
  while (t) {
    if (r) {
      for (e = 0; e < r; e++)
        if (d[f[e]] == 1) {
          d[f[e]] = -1;
          if (2 * s[f[e]] == y) g[s1[f[e]]] = 0;
          if (2 * s[f[e]] == u) g[s1[f[e]]] = 1;
          t--;
          for (c1 = a[f[e]]; c1; c1 = c1->e)
            if (d[c1->q] > 0) {
              d[c1->q] = -1;
              t--;
              g[s1[f[e]]] = g[s1[c1->q]] = c1->w;
              for (c1 = a[c1->q]; c1; c1 = c1->e) {
                d[c1->q]--;
                if (d[c1->q] == 1) {
                  f[r] = c1->q;
                  r++;
                }
              }
              break;
            }
        }
      r = 0;
    }
    while ((c < q) && (d[c] < 0)) c++;
    if (c < q) {
      if (d[c] == 0) {
        printf("NO");
        return 0;
      }
      if (d[c] == 2) {
        e = c;
        v = a[c]->q;
        g[s1[e]] = g[s1[v]] = a[c]->w;
        d[e] = d[v] = -1;
        t--;
        if (e != v) t--;
        for (c1 = a[e]; c1; c1 = c1->e) {
          d[c1->q]--;
          if (d[c1->q] == 1) {
            f[r] = c1->q;
            r++;
          }
        }
        if (e != v)
          for (c1 = a[v]; c1; c1 = c1->e) {
            d[c1->q]--;
            if (d[c1->q] == 1) {
              f[r] = c1->q;
              r++;
            }
          }
      }
    }
  }
  printf("YES\n");
  for (w = 0; w < q; w++) printf("%d ", (int)g[w]);
  return 0;
}
