#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
vector<long long> Lis;
int main() {
  long long a, b, n;
  cin >> n >> a >> b;
  int sw = 0;
  if (a > b) {
    sw = 1;
    swap(a, b);
  }
  for (int i = 0; i < n; i++) {
    int val;
    scanf("%d", &val);
    Lis.push_back(val);
    mp[val] = i + 1;
  }
  sort(Lis.begin(), Lis.end());
  int output[n + 10];
  map<int, int> yes;
  for (int i = 0; i < Lis.size(); i++) {
    long long val = Lis[i];
    if (mp[val] > 0) {
      if (mp[b - val] > 0) {
        output[mp[val]] = 1;
        output[mp[b - val]] = 1;
        mp[val] = 0;
        mp[b - val] = 0;
      } else if (mp[a - val] > 0) {
        output[mp[val]] = 0;
        output[mp[a - val]] = 0;
        mp[val] = 0;
        mp[a - val] = 0;
      } else {
        puts("NO");
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    cout << (output[i] + sw) % 2 << " ";
  }
  return 0;
}
