#include <bits/stdc++.h>
using namespace std;
int p[100000], patch[100000], vis[100000];
int n, a[2], flag = 0;
map<int, int> M;
bool dfs(int x, int y) {
  if (vis[x] == flag) return true;
  patch[x] = y;
  vis[x] = flag;
  if (!M.count(a[y] - p[x])) return false;
  if (!M.count(a[!y] - p[x]))
    return dfs(M[a[y] - p[x]], y);
  else
    return dfs(M[a[y] - p[x]], y) && dfs(M[a[!y] - p[x]], y);
}
int main() {
  scanf("%d%d%d", &n, &a[0], &a[1]);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &p[i]);
    M[p[i]] = i;
  }
  memset(patch, -1, sizeof patch);
  for (int i = 0; i < n; ++i) {
    if (patch[i] != -1) continue;
    if (++flag, dfs(i, 0))
      continue;
    else if (++flag, dfs(i, 1))
      continue;
    else {
      puts("NO");
      return 0;
    }
  }
  puts("YES");
  for (int i = 0; i < n; ++i) printf("%d%c", patch[i], " \n"[i == n - 1]);
  return 0;
}
