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