#include <bits/stdc++.h>
using namespace std;
int fa[100001], matrix[100001];
int n, a, b;
map<int, int> mp;
int my_find(int x);
int main() {
  int i;
  scanf("%d%d%d", &n, &a, &b);
  for (i = 1; i <= n; i++) {
    scanf("%d", &matrix[i]);
    mp[matrix[i]] = i;
  }
  for (i = 1; i <= n + 2; i++) fa[i] = i;
  int x;
  for (i = 1; i <= n; i++) {
    x = my_find(i);
    if (mp[a - matrix[i]])
      fa[x] = my_find(mp[a - matrix[i]]);
    else
      fa[x] = my_find(n + 1);
    x = my_find(i);
    if (mp[b - matrix[i]])
      fa[x] = my_find(mp[b - matrix[i]]);
    else
      fa[x] = my_find(n + 2);
  }
  if (my_find(n + 1) == my_find(n + 2))
    cout << "NO\n";
  else {
    cout << "YES\n";
    printf("%d", my_find(1) == my_find(n + 1));
    for (i = 2; i <= n; i++) printf(" %d", my_find(i) == my_find(n + 1));
    cout << endl;
  }
  return 0;
}
int my_find(int x) {
  if (fa[x] != x) fa[x] = my_find(fa[x]);
  return fa[x];
}
