#include <bits/stdc++.h>
using namespace std;
int n;
const int maxn = 1e5 + 5;
bool mark[maxn * 2];
vector<int> g[maxn * 2];
int S[maxn * 2], c;
map<int, int> mp;
int a, b;
int p[maxn];
bool vis[maxn];
bool dfs(int x) {
  if (mark[x ^ 1]) return 0;
  if (mark[x]) return 1;
  mark[x] = 1;
  S[c++] = x;
  for (int i = 0; i < g[x].size(); i++) {
    if (!dfs(g[x][i])) return 0;
  }
  return 1;
}
void add_edge(int x, int dx, int y, int dy) {
  x--;
  y--;
  int xx = x * 2 + dx;
  int yy = y * 2 + dy;
  if (xx != yy) {
    g[xx].push_back(yy);
  }
}
bool solve() {
  for (int i = 0; i < 2 * n; i += 2) {
    if (!mark[i] && !mark[i + 1]) {
      c = 0;
      if (!dfs(i)) {
        while (c > 0) mark[S[--c]] = 0;
        if (!dfs(i + 1)) {
          return 0;
        }
      }
    }
  }
  return 1;
}
int main() {
  scanf("%d %d %d", &n, &a, &b);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i]);
    mp[p[i]] = i;
  }
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      queue<int> q;
      q.push(p[i]);
      while (!q.empty()) {
        int now = q.front();
        q.pop();
        int nowi = mp[now];
        if (vis[nowi]) continue;
        vis[nowi] = 1;
        if (a - now <= 0) {
          int fuck = nowi;
          add_edge(fuck, 0, fuck, 1);
        } else {
          int fuck = nowi;
          int cao = mp[a - now];
          if (cao == 0)
            add_edge(fuck, 0, fuck, 1);
          else {
            add_edge(fuck, 0, cao, 0);
            add_edge(cao, 0, fuck, 0);
            vis[cao] = 1;
            if (b > p[cao] && mp[b - p[cao]] != 0) {
              add_edge(cao, 0, mp[b - p[cao]], 0);
              q.push(b - p[cao]);
            }
          }
          if (b > now && mp[b - now] != 0) {
            add_edge(fuck, 0, mp[b - now], 0);
            q.push(b - now);
          }
        }
      }
    }
  }
  memset(vis, 0, sizeof(vis));
  for (int i = 1; i <= n; i++) {
    if (!vis[i]) {
      queue<int> q;
      q.push(p[i]);
      while (!q.empty()) {
        int now = q.front();
        q.pop();
        int nowi = mp[now];
        if (vis[nowi]) continue;
        vis[nowi] = 1;
        if (b - now <= 0) {
          int fuck = nowi;
          add_edge(fuck, 1, fuck, 0);
        } else {
          int fuck = nowi;
          int cao = mp[b - now];
          if (cao == 0)
            add_edge(fuck, 1, fuck, 0);
          else {
            add_edge(fuck, 1, cao, 1);
            add_edge(cao, 1, fuck, 1);
            vis[cao] = 1;
            if (a > p[cao] && mp[a - p[cao]] != 0) {
              add_edge(cao, 0, mp[a - p[cao]], 0);
              q.push(a - p[cao]);
            }
          }
          if (a > now && mp[a - now] != 0) {
            add_edge(fuck, 1, mp[a - now], 1);
            q.push(a - now);
          }
        }
      }
    }
  }
  bool ans = solve();
  if (ans) {
    printf("YES\n");
    for (int i = 0; i < 2 * n; i++) {
      if (mark[i] == 1) {
        if (i % 2 == 0)
          printf("0 ");
        else
          printf("1 ");
      }
    }
  } else
    printf("NO\n");
  getchar();
  getchar();
  return 0;
}
