#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  vector<int> A, B;
  vector<int> v(n);
  unordered_map<int, int> m;
  int val;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &val);
    v[i] = val;
    m.insert(make_pair(val, i));
  }
  vector<bool> ans(n);
  for (int i = 0; i < n; ++i) {
    if (!m.count(v[i])) continue;
    int x = a - v[i], y = b - v[i];
    vector<pair<int, int> > ins;
    if (x != y)
      while (m.count(x) && m.count(y)) {
        ins.push_back(make_pair(x, y));
        swap(x, y);
        x = a - x;
        y = b - y;
      }
    if (!m.count(x) && !m.count(y)) {
      printf("NO\n");
      return 0;
    }
    bool to = m.count(y);
    ans[i] = to;
    for (int i = 0; i < ins.size(); ++i) {
      ans[m[ins[i].first]] = to;
      m.erase(ins[i].first);
      ans[m[ins[i].second]] = to;
      m.erase(ins[i].second);
    }
    ans[m[to ? y : x]] = to;
    m.erase(to ? y : x);
  }
  printf("YES\n");
  for (int i = 0; i < n; ++i) printf("%d ", (int)ans[i]);
  printf("\n");
  return 0;
}
