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.HashMap;
import java.util.Map;
import java.util.StringTokenizer;

/**
 * @author Don Li
 */
public class TwoSets {
    void solve() {
        int n = in.nextInt(), a = in.nextInt(), b = in.nextInt();
        int[] p = new int[n];
        for (int i = 0; i < n; i++) p[i] = in.nextInt();
        
        Map<Integer, Integer> map = new HashMap<>();
        for (int i = 0; i < n; i++) map.put(p[i], i);
        
        int[] can = new int[n];
        UnionFind unionFind = new UnionFind(n);
        for (int i = 0; i < n; i++) {
            int x = p[i];
            int j = map.getOrDefault(a - x, -1), k = map.getOrDefault(b - x, -1);
            
            if (j >= 0) {
                can[i] |= 1;
                unionFind.union(i, j);
            }
            if (k >= 0) {
                can[i] |= 2;
                unionFind.union(i, k);
            }
        }
        
        int[] sta = new int[n];
        for (int i = 0; i < n; i++) sta[i] = 3;
        for (int i = 0; i < n; i++) sta[unionFind.find(i)] &= can[i];
        
        for (int i = 0; i < n; i++) {
            if (sta[i] == 0) {
                out.println("NO");
                return;
            }
        }
        
        out.println("YES");
        for (int i = 0; i < n; i++) {
            if (i > 0) out.print(' ');
            if ((sta[unionFind.find(i)] & 1) > 0) out.print('0');
            else out.print('1');
        }
        out.println();
    }
    
    static class UnionFind {
        int[] parent;
        
        UnionFind(int n) {
            parent = new int[n];
            for (int i = 0; i < n; i++) parent[i] = -1;
        }
        
        int find(int i) {
            if (parent[i] < 0) return i;
            return parent[i] = find(parent[i]);
        }
        
        void union(int i, int j) {
            int x = find(i), y = find(j);
            if (x == y) return;
            if (x > y) {
                int t = x;
                x = y;
                y = t;
            }
            parent[x] += parent[y];
            parent[y] = x;
        }
    }
    
    public static void main(String[] args) {
        in = new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
        out = new PrintWriter(System.out);
        new TwoSets().solve();
        out.close();
    }
    
    static FastScanner in;
    static PrintWriter out;
    
    static class FastScanner {
        BufferedReader in;
        StringTokenizer st;
        
        public FastScanner(BufferedReader in) {
            this.in = in;
        }
        
        public String nextToken() {
            while (st == null || !st.hasMoreTokens()) {
                try {
                    st = new StringTokenizer(in.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }
        
        public int nextInt() {
            return Integer.parseInt(nextToken());
        }
        
        public long nextLong() {
            return Long.parseLong(nextToken());
        }
        
        public double nextDouble() {
            return Double.parseDouble(nextToken());
        }
    }
}
