#include <bits/stdc++.h>
using namespace std;
const double PI = 2.0 * acos(0.0);
const double E = exp(1);
template <class T1>
void deb(T1 e) {
  cout << e << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
template <typename T>
inline T sqr(T n) {
  return n * n;
}
inline double hypot(double x, double y) { return sqrt(sqr(x) + sqr(y)); }
template <typename T>
inline T pmod(T n, T m) {
  return ((n % m) + m) % m;
}
template <typename T>
T power(T n, int p) {
  return (p == 0) ? (T)(1) : (sqr(power(n, p >> 1)) * ((p & 1) * (n - 1) + 1));
}
template <typename T>
T bigmod(T n, int p, T m) {
  return (p == 0)
             ? (T)(1)
             : ((sqr(bigmod(n, p >> 1, m)) % m) * ((p & 1) * (n - 1) % m + 1)) %
                   m;
}
struct node {
  int f, pos;
};
map<int, node> mep;
map<int, node> other;
int flag[100005];
int main() {
  int ans = 1;
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  int num;
  node tmp;
  tmp.f = 1;
  for (int i = 0; i < n; i++) {
    scanf("%d", &num);
    tmp.pos = i;
    mep[num] = tmp;
  }
  other = mep;
  for (__typeof((mep).begin()) it = (mep.begin()); it != (mep).end(); ++it) {
    if (it->second.f) {
      if (mep[a - it->first].f) {
        flag[it->second.pos] = 0;
        flag[mep[(a - it->first)].pos] = 0;
        mep[a - it->first].f = 0;
        it->second.f = 0;
      } else if (mep[b - it->first].f) {
        flag[it->second.pos] = 1;
        flag[mep[(b - it->first)].pos] = 1;
        mep[b - it->first].f = 0;
        mep[it->first].pos = 0;
      } else {
        ans = 0;
        break;
      }
    }
  }
  if (ans) {
    printf("YES\n");
    for (int i = 0; i < n; ++i) printf("%d ", flag[i]);
    printf("\n");
  } else {
    ans = true;
    for (__typeof((other).begin()) it = (other.begin()); it != (other).end();
         ++it) {
      if (it->second.f) {
        if (other[b - it->first].f) {
          flag[it->second.pos] = 1;
          flag[other[(b - it->first)].pos] = 1;
          other[b - it->first].f = 0;
          other[it->first].f = 0;
        } else if (other[a - it->first].f) {
          flag[it->second.pos] = 0;
          flag[other[(a - it->first)].pos] = 0;
          other[a - it->first].f = 0;
          other[it->first].f = 0;
        } else {
          ans = 0;
          break;
        }
      }
    }
    if (ans) {
      printf("YES\n");
      for (int i = 0; i < n; ++i) printf("%d ", flag[i]);
      printf("\n");
    } else
      printf("NO\n");
  }
  return 0;
}
