Little X has n distinct integers: p1, p2, ..., pn. He wants to divide all of them into two sets A and B. The following two conditions must be satisfied:

  * If number x belongs to set A, then number a - x must also belong to set A. 
  * If number x belongs to set B, then number b - x must also belong to set B. 



Help Little X divide the numbers into two sets or determine that it's impossible.

Input

The first line contains three space-separated integers n, a, b (1 ≤ n ≤ 105; 1 ≤ a, b ≤ 109). The next line contains n space-separated distinct integers p1, p2, ..., pn (1 ≤ pi ≤ 109).

Output

If there is a way to divide the numbers into two sets, then print "YES" in the first line. Then print n integers: b1, b2, ..., bn (bi equals either 0, or 1), describing the division. If bi equals to 0, then pi belongs to set A, otherwise it belongs to set B.

If it's impossible, print "NO" (without the quotes).

Examples

Input

4 5 9
2 3 4 5


Output

YES
0 0 1 1


Input

3 3 4
1 2 4


Output

NO

Note

It's OK if all the numbers are in the same set, and the other one is empty.
#include <bits/stdc++.h>
using namespace std;
const long long nInf = -1000000000;
const long long pInf = 1000000000;
const long long mod = 1000000007;
int main() {
  int n, a, b;
  scanf("%d %d %d", &n, &a, &b);
  int *arr = new int[n];
  map<int, int, std::greater<int>> m;
  for (int i = 0; i < n; i++) {
    scanf("%d", arr + i);
    m[arr[i]] = i;
  }
  if (n % 2 != 0 && a % 2 != 0 && b % 2 != 0) {
    cout << "NO";
    return 0;
  }
  int iss[100000];
  fill(iss, iss + 100000, 0);
  while ((int)m.size() > 1) {
    map<int, int, std::greater<int>>::iterator itf = m.begin();
    int maxx = (*itf).first;
    int numm = (*itf).second;
    map<int, int, std::greater<int>>::iterator it1 = m.find(a - maxx);
    map<int, int, std::greater<int>>::iterator it2 = m.find(b - maxx);
    if (it1 == m.end() && it2 == m.end()) {
      cout << "NO";
      return 0;
    }
    if (it1 == m.end()) {
      int val2 = (*it2).first;
      int num2 = (*it2).second;
      iss[num2] = 2;
      iss[numm] = 2;
      if (val2 != maxx) m.erase(maxx);
      m.erase(val2);
      continue;
    }
    if (it2 == m.end()) {
      int val1 = (*it1).first;
      int num1 = (*it1).second;
      iss[num1] = 1;
      iss[numm] = 1;
      if (val1 != maxx) m.erase(val1);
      m.erase(maxx);
      continue;
    }
    int val2 = (*it2).first;
    int num2 = (*it2).second;
    int val1 = (*it1).first;
    int num1 = (*it1).second;
    if (val1 > val2) {
      iss[num2] = 2;
      iss[numm] = 2;
      if (val2 != maxx) m.erase(maxx);
      m.erase(val2);
    } else {
      iss[num1] = 1;
      iss[numm] = 1;
      if (val1 != maxx) m.erase(val1);
      m.erase(maxx);
    }
  }
  if ((int)m.size() == 1) {
    map<int, int, std::greater<int>>::iterator it1 = m.begin();
    if (a % 2 == 0 && it1->first == a / 2) {
      iss[it1->second] = 1;
    } else if (b % 2 == 0 && it1->first == b / 2) {
      iss[it1->second] = 2;
    } else {
      cout << "NO";
      return 0;
    }
    cout << "YES\n";
    for (int i = 0; i < n; i++) {
      printf("%d ", iss[i] - 1);
    }
    return 0;
  }
  cout << "YES\n";
  for (int i = 0; i < n; i++) {
    printf("%d ", iss[i] - 1);
  }
  return 0;
}
