#include <bits/stdc++.h>
using namespace std;
int n, A, B, x[100005];
map<int, int> p;
vector<int> arr;
bool ans[100005];
int main() {
  scanf("%d%d%d", &n, &A, &B);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x[i]);
    p[x[i]] = 1;
  }
  for (int i = 0; i < n; i++)
    if (!p[A - x[i]]) arr.push_back(x[i]);
  for (int i = 0; i < arr.size(); i++) {
    p[arr[i]] = 2;
    if (!p[B - arr[i]]) return puts("NO");
    if (p[B - arr[i]] != 2) {
      p[B - arr[i]] = 2;
      if (p[A - (B - arr[i])] == 1) {
        arr.push_back(A - (B - arr[i]));
        p[A - (B - arr[i])] = 2;
      }
    }
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) cout << p[x[i]] - 1 << " ";
  return 0;
}
