#include <bits/stdc++.h>
using namespace std;
long long pwr(long long base, long long p, long long mod = (1000000007LL)) {
  long long ans = 1;
  while (p) {
    if (p & 1) ans = (ans * base) % mod;
    base = (base * base) % mod;
    p /= 2;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
int n, a, b, ans[100005];
set<int> avail;
map<int, int> idx_;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    int a;
    scanf("%d", &a);
    avail.insert(a);
    idx_[a] = i;
  }
  int set1 = 0, set2 = 1;
  if (a > b) {
    swap(a, b);
    swap(set1, set2);
  }
  while (!avail.empty()) {
    int val = (*avail.begin());
    if (avail.find(b - val) != avail.end()) {
      avail.erase(val);
      avail.erase(b - val);
      ans[idx_[val]] = ans[idx_[b - val]] = set2;
      continue;
    }
    if (avail.find(a - val) != avail.end()) {
      avail.erase(val);
      avail.erase(a - val);
      ans[idx_[val]] = ans[idx_[a - val]] = set1;
      continue;
    }
    printf("NO\n");
    return 0;
  }
  printf("YES\n");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
