#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
const double pi = acos(-1.0);
const int INF = 0x3f3f3f3f;
int a[100005];
map<int, int> mp;
set<int> s, g;
int ans[100005];
set<int>::iterator it;
vector<int> c;
int main() {
  int n, a, b, x;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &x);
    s.insert(x);
    mp[x] = i;
  }
  for (it = s.begin(); it != s.end(); ++it) {
    int x = (*it);
    if (s.find(a - x) == s.end()) c.push_back(x);
  }
  for (int i = 0; i < (int)c.size(); i++) {
    s.erase(c[i]);
    g.insert(c[i]);
  }
  while (!g.empty()) {
    it = g.begin();
    int x = *it;
    if (g.find(b - x) != g.end()) {
      ans[mp[x]] = 1;
      ans[mp[b - x]] = 1;
      g.erase(x);
      if (x * 2 != b) g.erase(b - x);
    } else if (s.find(b - x) != s.end()) {
      ans[mp[x]] = 1;
      ans[mp[b - x]] = 1;
      s.erase(b - x);
      if (2 * (b - x) != a) s.erase(a - (b - x));
      g.erase(x);
      if (2 * (b - x) != a) g.insert(a - (b - x));
    } else {
      printf("NO\n");
      return 0;
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  puts("");
  return 0;
}
