#include <bits/stdc++.h>
using namespace std;
const int N = 100000;
struct dsu {
  dsu *p;
  int size;
  dsu() {
    p = this;
    size = 1;
  }
  dsu *find() {
    if (p == this) return this;
    return p = p->find();
  }
};
void unite(dsu *a, dsu *b) {
  a = a->find();
  b = b->find();
  if (a != b) {
    if (a->size < b->size) swap(a, b);
    a->size += b->size;
    b->p = a;
  }
}
int ans[N];
dsu v[N];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  unordered_map<int, int> m;
  int val;
  for (int i = 0; i < n; ++i) {
    scanf("%d", &val);
    m.insert(make_pair(val, i));
  }
  unordered_map<int, int>::iterator it;
  for (auto i : m) {
    it = m.find(a - i.first);
    if (it != m.end()) unite(v + i.second, v + it->second);
    it = m.find(b - i.first);
    if (it != m.end()) unite(v + i.second, v + it->second);
  }
  for (auto i : m) {
    if (ans[v[i.second].find() - v]) {
      if (ans[v[i.second].find() - v] == 1 && !m.count(a - i.first)) {
        if (m.count(b - i.first))
          ans[v[i.second].find() - v] = 2;
        else {
          printf("NO\n");
          return 0;
        }
      } else if (ans[v[i.second].find() - v] == 2 && !m.count(b - i.first)) {
        printf("NO\n");
        return 0;
      }
    } else {
      if (m.count(a - i.first))
        ans[v[i.second].find() - v] = 1;
      else if (m.count(b - i.first))
        ans[v[i.second].find() - v] = 2;
      else {
        printf("NO\n");
        return 0;
      }
    }
  }
  for (auto i : m) {
    if (ans[v[i.second].find() - v] == 2 && !m.count(b - i.first)) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  for (int i = 0; i < n; ++i) printf("%d ", ans[v[i].p - v] - 1);
  printf("\n");
  return 0;
}
