#include <bits/stdc++.h>
using namespace std;
const int SIZE = 100005;
const int MSIZE = 10000;
const int INF = 1 << 30;
set<int>::iterator it;
int main() {
  int n, a, b;
  int p[SIZE];
  set<int> fi, se;
  map<int, int> mp;
  bool flag[SIZE];
  while (cin >> n >> a >> b) {
    fi.clear(), se.clear(), mp.clear();
    memset(flag, 0, sizeof(flag));
    for (int i = 0; i < n; i++) {
      scanf("%d", &p[i]);
      fi.insert(p[i]);
      mp[p[i]] = i;
    }
    vector<int> v;
    for (it = fi.begin(); it != fi.end(); it++) {
      if (fi.find(a - *it) == fi.end()) {
        se.insert(*it);
        v.push_back(*it);
      }
    }
    for (int i = 0; i < v.size(); i++) {
      fi.erase(v[i]);
      se.insert(v[i]);
    }
    bool mark = 0;
    while (!se.empty()) {
      it = se.begin();
      int x = *it;
      if (se.find(b - x) != se.end()) {
        flag[mp[x]] = flag[mp[b - x]] = 1;
        se.erase(x);
        if ((x)*2 != b) se.erase(b - x);
      } else if (fi.find(b - x) != fi.end()) {
        flag[mp[x]] = flag[mp[b - x]] = 1;
        fi.erase(b - x);
        se.erase(x);
        if ((b - x) * 2 != a) {
          fi.erase(a - (b - x));
          se.insert(a - (b - x));
        }
      } else {
        puts("NO");
        mark = 1;
        break;
      }
    }
    if (mark) continue;
    puts("YES");
    for (int i = 0; i < n; i++) printf("%d ", flag[i]);
    puts("");
  }
}
