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.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

public class Test {
    static int[] color = new int[100005];
    static int[] grp = new int[100005];
    static int[] dat = new int[100005];
    static Map<Integer, Integer> map = new HashMap<Integer, Integer>();
    static int getRoot(int a) {
        int na = a;
        while (a != grp[a]) a = grp[a];
        while (na != grp[na]) {
            int ta = grp[na];
            grp[na] = a;
            na = ta;
        }
        return a;
    }
    static boolean merge(int a, int b) {
        int ra = getRoot(a); 
        int rb = getRoot(b);   
        if (color[ra] >= 0 && color[rb] >= 0 && color[ra] != color[rb]) {
            // 7 10 11
            // 8 2 9 4 6 7 3  
            // System.out.println("AAAAAAAAAAAAAA");
            // System.out.println(dat[a] + " " + dat[b] + " " + a + " " + b + " " + ra + " " + rb);
            return false;
        }
        grp[ra] = rb;        
        if (color[ra] >= 0) color[rb] = color[ra];
        return true;
    }
    public static void main(String[] args) {
        InputReader sc = new InputReader(System.in);
        PrintWriter out = new PrintWriter(System.out);
        int n = sc.nextInt();
        int a = sc.nextInt();
        int b = sc.nextInt();
        Arrays.fill(color, -1);
        for (int i = 0; i < n; ++i) {
            dat[i] = sc.nextInt();
            map.put(dat[i], i);
            grp[i] = i;
        }
        for (int i = 0; i < n; ++i) {
            int cur = dat[i];
            int op1 = a - cur;
            int op2 = b - cur;
            boolean c1 = map.containsKey(op1);
            boolean c2 = map.containsKey(op2);
            int curColor = -1;
            if (!c1 && !c2) {
                out.println("NO");
                out.close();
                return;
            } else if (!c1) {
                curColor = 1;
            } else if (!c2) {
                curColor = 0;
            }
            if (c1) {
                if (!merge(i, map.get(op1))) {
                    out.println("NO");
                    out.close();
                    return;
                }
            }
            if (c2) {
                if (!merge(i, map.get(op2))) {
                    out.println("NO");
                    out.close();
                    return;
                }
            }
            int ri = getRoot(i);
            if (curColor == -1) continue;
            if (color[ri] == -1)  color[ri] = curColor; 
            else if (curColor != color[ri]) {System.out.println("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa " + i + " " + color[ri]);
                out.println("NO");
                out.close();
                return;
            }
        }

        out.println("YES");
        for (int i = 0; i < n ; ++i) {
            int ri = getRoot(i);
            int curColor = 0;
            if (color[ri] >= 0) curColor = color[ri];
            out.printf("%d%c", curColor, (i + 1 == n ? '\n':' '));
        }

        out.close();
    }
    public static void debug(Object... o) {
        System.out.println(Arrays.deepToString(o));
    }
    static class InputReader {
        BufferedReader reader;
        StringTokenizer tokenizer;
        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
        }
        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }
        public int nextInt() {
            return Integer.parseInt(next());
        }
    }
}
