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;
void move(int &curr, int &next, vector<vector<int>> &adjList) {
  int temp = next;
  if (adjList[next][0] != curr) {
    next = adjList[next][0];
    curr = temp;
  } else {
    next = adjList[next][1];
    curr = temp;
  }
}
int main() {
  int N, A, B;
  cin >> N >> A >> B;
  vector<int> info(N);
  map<int, int> toIndex;
  for (int i = 0; i < N; i++) {
    cin >> info[i];
    toIndex[info[i]] = i;
  }
  bool valid = true;
  vector<vector<int>> adjList(N);
  for (int i = 0; i < N; i++) {
    int next_A = A - info[i];
    if (toIndex.count(next_A)) adjList[i].push_back(toIndex[next_A]);
    int next_B = B - info[i];
    if (next_B != next_A and toIndex.count(next_B))
      adjList[i].push_back(toIndex[next_B]);
    if (adjList[i].size() == 0) valid = false;
  }
  if (!valid) {
    cout << "NO" << endl;
    return 0;
  }
  vector<bool> visited(N);
  vector<int> result(N, -1);
  for (int i = 0; i < N; i++) {
    if (visited[i] == 0 and adjList[i].size() == 1) {
      int curr = i;
      int next = adjList[curr][0];
      while (true) {
        visited[curr] = 1;
        visited[next] = 1;
        int first = info[curr];
        int second = info[next];
        if (A - first == second)
          result[curr] = result[next] = 0;
        else
          result[curr] = result[next] = 1;
        if (adjList[next].size() == 1) break;
        move(curr, next, adjList);
        if (adjList[next].size() == 1) {
          valid = false;
          break;
        }
        move(curr, next, adjList);
      }
    }
  }
  if (!valid) {
    cout << "NO" << endl;
    return 0;
  }
  for (int i = 0; i < N; i++) {
    if (visited[i] == 0) {
      int curr = i;
      int next = adjList[curr][0];
      while (true) {
        visited[curr] = 1;
        visited[next] = 1;
        int first = info[curr];
        int second = info[next];
        if (A - first == second)
          result[curr] = result[next] = 0;
        else
          result[curr] = result[next] = 1;
        if (adjList[next].size() == 1) break;
        move(curr, next, adjList);
        move(curr, next, adjList);
        if (visited[curr]) break;
      }
    }
  }
  cout << "YES" << endl;
  for (int i = 0; i < N; i++) {
    printf("%d", result[i]);
    printf(i != N - 1 ? " " : "\n");
  }
}
