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.
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.*;

public class D {
    private static int[] root, size;

    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());
        int n = Integer.parseInt(st.nextToken()), a = Integer.parseInt(st.nextToken()), b = Integer.parseInt(st.nextToken()), num[] = new int[n]; root = new int[n]; size = new int[n];

        HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();
        st = new StringTokenizer(br.readLine());
        for (int i = 0; i < n; i++) {
            num[i] = Integer.parseInt(st.nextToken());
            map.put(num[i], i);
            root[i] = i;
            size[i] = 1;
        }

        for (int i = 0; i < n; i++) {
            if (!map.containsKey(a - num[i]) && !map.containsKey(b - num[i])) {
                out.println("NO");
                out.close();
                System.exit(0);
            }
        }

        for (int i = 0; i < n; i++) {
            if (map.containsKey(a - num[i]))
                union(i, map.get(a - num[i]));

            if (map.containsKey(b - num[i]))
                union(i, map.get(b - num[i]));
        }

        boolean[] mustBeInA = new boolean[n], mustBeInB = new boolean[n];
        for (int i = 0; i < n; i++) {
            boolean aMinusX = map.containsKey(a - num[i]), bMinusX = map.containsKey(b - num[i]);
            if (aMinusX && !bMinusX)
                mustBeInA[find(i)] = true;
            if (!aMinusX && bMinusX)
                mustBeInB[find(i)] = true;
        }

        for (int i = 0; i < n; i++) {
            if (mustBeInA[i] && mustBeInB[i]) {
                out.println("NO");
                out.close();
                System.exit(0);
            }
        }

        out.println("YES");
        for (int i = 0; i < n; i++) {
            if (mustBeInA[find(i)])
                out.print("0 ");
            else
                out.print("1 ");
        }
        out.close();
    }

    private static int find(int v) {
        while (v != root[v])
            v = root[v];
        return v;
    }

    private static void union(int p, int q) {
        int pR = find(p), qR = find(q);
        if (pR == qR)
            return;

        if (size[pR] < size[qR]) {
            root[pR] = qR;
            size[qR] += size[pR];
        } else {
            root[qR] = pR;
            size[pR] += size[qR];
        }
    }
}
