#include <bits/stdc++.h>
using namespace std;
using namespace std;
const long long mod = 1e9 + 7;
const double eps = 1e-9;
const int maxn = 1e5 + 10;
set<int> num, s1, s2;
int ans[maxn];
map<int, bool> mp;
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &ans[i]);
    num.insert(ans[i]);
    mp[ans[i]] = false;
  }
  bool f = true;
  for (int x : num) {
    if (mp[x] == false) {
      if (num.find(a - x) != num.end() && mp[a - x] == false) {
        mp[a - x] = true;
        s1.insert(x);
        s1.insert(a - x);
      } else if (num.find(b - x) != num.end() && mp[b - x] == false) {
        mp[b - x] = true;
        s2.insert(x);
        s2.insert(b - x);
      } else {
        f = false;
        break;
      }
      mp[x] = true;
    }
  }
  if (f) {
    puts("YES");
    for (int i = 0; i < n; ++i) {
      if (s1.find(ans[i]) != s1.end())
        printf("0 ");
      else
        printf("1 ");
    }
    puts("");
    return 0;
  }
  for (int i = 0; i < n; ++i) {
    mp[ans[i]] = false;
  }
  s1.clear();
  s2.clear();
  f = true;
  for (int x : num) {
    if (mp[x] == false) {
      if (num.find(b - x) != num.end() && mp[b - x] == false) {
        mp[b - x] = true;
        s2.insert(x);
        s2.insert(b - x);
      } else if (num.find(a - x) != num.end() && mp[a - x] == false) {
        mp[a - x] = true;
        s1.insert(x);
        s1.insert(a - x);
      } else {
        f = false;
        break;
      }
      mp[x] = true;
    }
  }
  if (f) {
    puts("YES");
    for (int i = 0; i < n; ++i) {
      if (s1.find(ans[i]) != s1.end())
        printf("0 ");
      else
        printf("1 ");
    }
    puts("");
    return 0;
  }
  puts("NO");
  return 0;
}
