#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
map<int, int> mp;
int vis[N], f[N];
int n, a, b;
bool dfs(int v, int m) {
  if (m == 2) {
    if (vis[mp[b - v]] == -1) {
      vis[mp[b - v]] = vis[mp[v]] = 1;
      return 1;
    }
    if (vis[mp[a - v]] == -1) {
      vis[mp[a - v]] = vis[mp[v]] = 0;
      return 1;
    }
    if (vis[mp[a - v]] == 1) {
      vis[mp[a - v]] = vis[mp[v]] = 0;
      return dfs(b - a + v, 1);
    }
    return 0;
  } else {
    if (vis[mp[a - v]] == -1 || vis[mp[a - v]] == 0) {
      vis[mp[a - v]] = vis[mp[v]] = 0;
      return 1;
    }
    if (vis[mp[a - v]] == 1) {
      vis[mp[a - v]] = vis[mp[v]] = 0;
      return dfs(b - a + v, 1);
    }
    return 0;
  }
  return 0;
}
int main() {
  cin >> n >> a >> b;
  vis[0] = 2;
  for (int i = 1; i <= n; i++) {
    vis[i] = -1;
    scanf("%d", &f[i]);
    mp[f[i]] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (vis[i] == -1) {
      if (dfs(f[i], 2))
        ;
      else {
        puts("NO");
        return 0;
      }
    }
  }
  puts("YES");
  for (int i = 1; i <= n; i++) printf("%d ", vis[i]);
}
