#include <bits/stdc++.h>
using namespace std;
const long N = 2 * 100000 + 7;
const long INF = 1000000000 + 7;
const long MODULE = 1000000000 + 7;
class TwosatSolver {
 public:
  int nov, cnt;
  int *visited, *num, *low, *lab, *val;
  vector<int> *a, *b;
  stack<int> s;
  vector<int> res;
  TwosatSolver(int n) {
    this->nov = n;
    a = new vector<int>[2 * n + 10];
    visited = new int[2 * n + 10];
    for (int i = 0; i < 2 * n + 10; i++) {
      visited[i] = 0;
    }
    num = new int[2 * n + 10];
    low = new int[2 * n + 10];
    lab = new int[2 * n + 10];
    val = new int[2 * n + 10];
  }
  void add_clause(int u, int v) {
    a[neg(u, nov)].push_back(inf(v, nov));
    a[neg(v, nov)].push_back(inf(u, nov));
  }
  int neg(int u, int n) {
    if (u < 0) return -u;
    if (u > n)
      return abs(u) - n;
    else
      return n + abs(u);
  }
  int inf(int u, int n) {
    if (u < 0) return n + abs(u);
    return u;
  }
  void dfs(int u) {
    num[u] = low[u] = ++num[0];
    s.push(u);
    for (int i = 0; i < a[u].size(); i++) {
      int v = a[u][i];
      if (visited[v]) continue;
      if (num[v]) {
        low[u] = min(low[u], num[v]);
      } else {
        dfs(v);
        low[u] = min(low[u], low[v]);
      }
      if (val[v] == 0) val[u] = 0;
    }
    if (low[u] == num[u]) {
      if (val[u] == -1) val[u] = 1, val[neg(u, nov)] = 0;
      while (true) {
        int v = s.top();
        s.pop();
        visited[v] = true;
        lab[v] = u;
        val[v] = val[u];
        if (v == u) return;
      }
    }
  }
  bool solve() {
    for (int i = 0; i <= 2 * nov; i++)
      val[i] = -1, num[i] = low[i] = lab[i] = 0;
    while (!s.empty()) s.pop();
    cnt = 0;
    for (int i = 1; i <= 2 * nov; i++)
      if (!visited[i]) dfs(i);
    for (int i = 1; i <= nov; i++)
      if (lab[i] == lab[neg(i, nov)]) {
        return false;
      }
    for (int i = 1; i <= nov; i++)
      if (val[i] == 1) res.push_back(i);
    return true;
  }
};
unordered_map<long long, int> mp;
int X[100000 + 10], B[100000 + 10];
int main() {
  int n, a, b, num1, num2;
  cin >> n >> a >> b;
  TwosatSolver twosat = TwosatSolver(n);
  for (int i = 1; i <= n; i++) {
    cin >> *(X + i);
    *(B + i) = 1;
    mp[X[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    num1 = 0;
    num2 = 0;
    if (mp[a - X[i]] != 0) {
      num1 = 1;
      twosat.add_clause(-i, mp[a - X[i]]);
    }
    if (mp[b - X[i]] != 0) {
      num2 = 1;
      twosat.add_clause(i, -mp[b - X[i]]);
    }
    if (num1 == 0) {
      twosat.add_clause(-i, -i);
    }
    if (num2 == 0) {
      twosat.add_clause(i, i);
    }
  }
  if (twosat.solve()) {
    cout << "YES" << endl;
    for (int i = 0; i < twosat.res.size(); i++) *(B + twosat.res[i]) = 0;
    for (int i = 1; i <= n; i++) {
      cout << *(B + i) << " ";
    }
  } else {
    cout << "NO";
  }
  return 0;
}
