#include <bits/stdc++.h>
using namespace std;
vector<int> B;
map<int, int> A;
int n, a, b, p[100005], x;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    scanf("%d", p + i);
    A[p[i]] = 1;
  }
  for (int i = 0; i < n; ++i) {
    if (!A.count(a - p[i])) B.push_back(p[i]);
  }
  while (!B.empty()) {
    x = B.back();
    B.pop_back();
    if (!A.count(b - x)) puts("NO"), exit(0);
    A.find(x)->second = 2;
    A.find(b - x)->second = 2;
    if (A.count(a - (b - x)) && A.find(a - (b - x))->second == 1)
      B.push_back(a - (b - x));
  }
  puts("YES");
  for (int i = 0; i < n; ++i) {
    printf("%d ", A[p[i]] - 1);
  }
}
