#include <bits/stdc++.h>
using namespace std;
map<int, int> m;
int vis[100007];
int p[100007];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  int check = 0;
  if (a > b) {
    swap(a, b);
    check = 1;
  }
  for (int i = 0; i < n; i++) {
    cin >> p[i];
    m[p[i]] = i + 1;
  }
  map<int, int>::iterator it;
  for (it = m.begin(); it != m.end(); it++) {
    if (it->second) {
      if (m[b - it->first]) {
        vis[it->second] = 1;
        vis[m[b - it->first]] = 1;
        m[it->first] = 0;
        m[b - it->first] = 0;
      } else if (m[a - it->first]) {
        vis[it->second] = 0;
        vis[m[a - it->first]] = 0;
        m[it->first] = 0;
        m[a - it->first] = 0;
      } else {
        cout << "NO" << endl;
        return 0;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 1; i <= n; i++) {
    if (check == 1) {
      cout << 1 - vis[i] << " ";
    } else {
      cout << vis[i] << " ";
    }
  }
}
