#include <bits/stdc++.h>
using namespace std;
int fa[111000], num[111000];
int find(int x) { return fa[x] == x ? x : fa[x] = find(fa[x]); }
int main() {
  int n, a, b;
  while (cin >> n >> a >> b) {
    map<int, int> mp;
    for (int i = 1; i <= n; i++) {
      cin >> num[i];
      mp[num[i]] = i;
    }
    for (int i = 1; i <= n + 2; i++) fa[i] = i;
    int x;
    for (int i = 1; i <= n; i++) {
      x = find(i);
      if (mp[a - num[i]])
        fa[x] = find(mp[a - num[i]]);
      else
        fa[x] = find(n + 1);
      x = find(i);
      if (mp[b - num[i]])
        fa[x] = find(mp[b - num[i]]);
      else
        fa[x] = find(n + 2);
    }
    if (find(n + 1) == find(n + 2))
      cout << "NO\n";
    else {
      cout << "YES\n";
      printf("%d", find(1) == find(n + 1));
      for (int i = 2; i <= n; i++) printf(" %d", find(i) == find(n + 1));
      cout << endl;
    }
  }
  return 0;
}
