#include <bits/stdc++.h>
using namespace std;
map<int, int> mp;
queue<int> q;
int num[100005], a, b, n;
int main() {
  while (~scanf("%d%d%d", &n, &a, &b)) {
    for (int i = 0; i < n; i++) {
      scanf("%d", &num[i]);
      mp[num[i]] = 1;
    }
    while (!q.empty()) q.pop();
    for (int i = 0; i < n; i++)
      if (!mp[a - num[i]]) q.push(num[i]);
    int flag = 1;
    while (!q.empty()) {
      int u = q.front();
      q.pop();
      if (mp[u] > 0 && mp[a - u] == 0 && mp[b - u] == 0) {
        printf("NO\n");
        flag = 0;
        break;
      }
      mp[u]--;
      mp[b - u]--;
      int cnt = a - b + u;
      if (mp[cnt]) q.push(cnt);
    }
    if (flag == 1) {
      printf("YES\n");
      for (int i = 0; i < n - 1; i++) {
        if (mp[num[i]] == 1)
          printf("0 ");
        else
          printf("1 ");
      }
      if (mp[num[n - 1]] == 1)
        printf("0\n");
      else
        printf("1\n");
    }
  }
  return 0;
}
