#include <bits/stdc++.h>
using namespace std;
const long long nInf = -1000000000;
const long long pInf = 1000000000;
const long long mod = 1000000007;
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  int *arr = new int[n];
  map<int, int, std::greater<int>> m;
  for (int i = 0; i < n; i++) {
    scanf("%d", arr + i);
    m[arr[i]] = i;
  }
  if (n % 2 != 0 && a % 2 != 0 && b % 2 != 0) {
    cout << "NO";
    return 0;
  }
  int iss[100000];
  fill(iss, iss + 100000, 0);
  while ((int)m.size() > 1) {
    map<int, int, std::greater<int>>::iterator itf = m.begin();
    int maxx = (*itf).first;
    int numm = (*itf).second;
    map<int, int, std::greater<int>>::iterator it1 = m.find(a - maxx);
    map<int, int, std::greater<int>>::iterator it2 = m.find(b - maxx);
    if (it1 == m.end() && it2 == m.end()) {
      cout << "NO";
      return 0;
    }
    if (it1 == m.end()) {
      int val2 = (*it2).first;
      int num2 = (*it2).second;
      iss[num2] = 2;
      iss[numm] = 2;
      if (val2 != maxx) m.erase(maxx);
      m.erase(val2);
      continue;
    }
    if (it2 == m.end()) {
      int val1 = (*it1).first;
      int num1 = (*it1).second;
      iss[num1] = 1;
      iss[numm] = 1;
      if (val1 != maxx) m.erase(val1);
      m.erase(maxx);
      continue;
    }
    int val2 = (*it2).first;
    int num2 = (*it2).second;
    int val1 = (*it1).first;
    int num1 = (*it1).second;
    if (val1 > val2) {
      iss[num2] = 2;
      iss[numm] = 2;
      if (val2 != maxx) m.erase(maxx);
      m.erase(val2);
    } else {
      iss[num1] = 1;
      iss[numm] = 1;
      if (val1 != maxx) m.erase(val1);
      m.erase(maxx);
    }
  }
  if ((int)m.size() == 1) {
    map<int, int, std::greater<int>>::iterator it1 = m.begin();
    if (a % 2 == 0 && it1->first == a / 2) {
      iss[it1->second] = 1;
    } else if (b % 2 == 0 && it1->first == b / 2) {
      iss[it1->second] = 2;
    } else {
      cout << "NO";
      return 0;
    }
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      printf("%d ", iss[i] - 1);
    }
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    printf("%d ", iss[i] - 1);
  }
  return 0;
}
