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.*;
import java.util.*;
import java.util.function.Function;

public class Main {
    public static void main(String[] args) throws InterruptedException {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        MyScanner in = new MyScanner(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        solve(in, out);
        out.close();
    }

    static int[] p;
    static int[] result;
    static int a,b;

    static List<Integer> used = new ArrayList<>();

    static void solve(MyScanner in, PrintWriter out) {
        int n;
        n = in.nextInt();
        a = in.nextInt();
        b = in.nextInt();
        p = new int[n];
        result = new int[n];
        Map<Integer, Integer> hm = new HashMap<>();
        for (int i = 0; i < p.length; i++) {
            p[i] = in.nextInt();
            hm.put(p[i], i);
        }
        List<Integer>[] g = new List[n];
        for (int i = 0; i < n; i++) {
            g[i] = new ArrayList<>();
            int ab = a - p[i];
            if (hm.containsKey(ab)) {
                g[i].add(hm.get(ab));
            }
            int bb = b - p[i];
            if (hm.containsKey(bb)) {
                g[i].add(hm.get(bb));
            }
        }
        int res1 = maxMatching(g, n);
        if (res1 == n) {
            out.println("YES");
            for (int t : result) {
                out.print(t + " ");
            }
        } else {
            out.print("NO");
        }
    }



    public static int maxMatching(List<Integer>[] graph, int n2) {
        int n1 = graph.length;
        int[] matching = new int[n2];
        Arrays.fill(matching, -1);
        int matches = 0;
        boolean[] used = new boolean[n1];
        for (int u = 0; u < n1; u++) {
            for (int x : Main.used) {
                used[x] = false;
            }
            Main.used.clear();
            if (findPath(graph, u, matching, used))
                ++matches;
        }

        for (int i=0; i< n2; ++i)
            if (matching[i] != -1) {
                int type = p[matching[i]] + p[i];
                if (type == a) {
                    result[matching[i]] = 0;
                    result[i] = 0;
                }
                if (type == b) {
                    result[matching[i]] = 1;
                    result[i] = 1;
                }
            }

        return matches;
    }

    static boolean findPath(List<Integer>[] graph, int u1, int[] matching, boolean[] vis) {

        vis[u1] = true;
        used.add(u1);
        for (int v : graph[u1]) {
            int u2 = matching[v];
            if (u2 == -1 || !vis[u2] && findPath(graph, u2, matching, vis)) {
                matching[v] = u1;
                return true;
            }
        }
        return false;
    }

    static class intrv {
        int l, r;

        public intrv(int l, int r) {
            this.l = l;
            this.r = r;
        }
    }

    static class MyScanner {
        BufferedReader br;
        StringTokenizer st;

        public MyScanner(InputStream io) {
            br = new BufferedReader(new InputStreamReader(io));
        }

        public String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }
    }
}
