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.
// D.

import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.BitSet;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
/**
 *
 * @author freel
 */
public class Main {

    static int find(int[] uf, int x) {
        return uf[x] == x ? x : (uf[x] = find(uf, uf[x]));
    }

    static void uni(int[] uf, int[] h, int x, int y) {
        x = find(uf, x);
        y = find(uf, y);
        if (h[x] == h[y]) {
            ++h[x];
            uf[y] = x;
        } else if (h[x] < h[y]) {
            uf[x] = y;
        } else {
            uf[y] = x;
        }
    }

    static void initUF(int[] uf, int[] h, int n) {
        for (int i = 1; i < n; ++i) {
            uf[i] = i;
            h[i] = 0;
        }
    }

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
        StringTokenizer tokenizer;

        try {
            tokenizer = new StringTokenizer(reader.readLine());
            int n = Integer.parseInt(tokenizer.nextToken());
            int a = Integer.parseInt(tokenizer.nextToken());
            int b = Integer.parseInt(tokenizer.nextToken());
            tokenizer = new StringTokenizer(reader.readLine());
            int[] p = new int[n + 1], uf = new int[n + 1], h = new int[n + 1];
            Map<Integer, Integer> map = new HashMap<Integer, Integer>();
            initUF(uf, h, n + 1);
            for (int i = 1; i <= n; ++i) {
                p[i] = Integer.parseInt(tokenizer.nextToken());
                map.put(p[i], i);
            }
            BitSet sa = new BitSet(), sb = new BitSet();
            for (int i = 1; i <= n; ++i) {
                if (map.containsKey(a - p[i])) {
                    uni(uf, h, map.get(a - p[i]), i);
                    sa.set(i);
                }
                if (map.containsKey(b - p[i])) {
                    uni(uf, h, map.get(b - p[i]), i);
                    sb.set(i);
                }
            }
            BitSet usa = new BitSet(), usb = new BitSet();
            usa.flip(1, n + 1);
            usb.flip(1, n + 1);
            for (int i = 1; i <= n; ++i) {
                usa.set(find(uf, i), usa.get(find(uf, i)) & sa.get(i));
                usb.set(find(uf, i), usb.get(find(uf, i)) & sb.get(i));
            }
            boolean okay = true;
            for (int i = 1; i <= n; ++i) {
                if (!usa.get(i) && !usb.get(i)) {
                    okay = false;
                    break;
                }
            }
            if (okay) {
                writer.println("YES");
                for (int i = 1; i <= n; ++i) {
                    if (i == 1) {
                        writer.print(usa.get(find(uf, i)) ? '0' : '1');
//                        writer.print(" " + array[i]);
                    } else {
                        writer.print(" " + (usa.get(find(uf, i)) ? "0" : "1"));
//                        writer.print(" " + array[i]);
                    }
                }
                writer.println();
            } else {
                writer.println("NO");
            }
        } catch (Exception e) {
            e.printStackTrace();
            //
        } finally {
            writer.close();
        }
    }

}
