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.BufferedInputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.InputMismatchException;

public class Main 
{
	private int[] father;
	
	public int findFather(int x)
	{
		if(x == father[x])
		{
			return x;
		}
		else
		{
			return father[x] = findFather(father[x]);
		}
	}
	
	public void mergeUnion(int x, int y)
	{
		int fx = findFather(x);
		int fy = findFather(y);
		if(fx != fy)
		{
			father[fx] = fy;
		}
	}
	
	public void foo()
	{
		MyScanner scan = new MyScanner();
		PrintWriter out = new PrintWriter(System.out);
		int n = scan.nextInt();
		int a = scan.nextInt();
		int b = scan.nextInt();
		int[] p = new int[n];
		HashMap<Integer, Integer> hm = new HashMap<Integer, Integer>();
		for(int i = 0;i < n;++i)
		{
			int x = scan.nextInt();
			p[i] = x;
			hm.put(x, i);
		}
		father = new int[n + 2];
		for(int i = 0;i < n + 2;++i)
		{
			father[i] = i;
		}
		for(int i = 0;i < n;++i)
		{
			if(hm.containsKey(a - p[i]))
			{
				mergeUnion(i, hm.get(a - p[i]));
			}
			else
			{
				mergeUnion(i, n + 1);
			}
			if(hm.containsKey(b - p[i]))
			{
				mergeUnion(i, hm.get(b - p[i]));
			}
			else
			{
				mergeUnion(i, n);
			}
		}
		int f1 = findFather(n);
		int f2 = findFather(n + 1);
		if(f1 == f2)
		{
			out.println("NO");
		}
		else
		{
			out.println("YES");
			for(int i = 0;i < n;++i)
			{
				if(findFather(i) == f1)
				{
					out.print(0 + " ");
				}
				else
				{
					out.print(1 + " ");
				}
			}
			out.println();
		}
		out.close();
	}
	
	public static void main(String[] args)
	{
		new Main().foo();
	}
	
	class MyScanner
	{
	    private byte[] buf = new byte[1024];
	    private int curChar;
	    private int numChars;
	    BufferedInputStream bis = new BufferedInputStream(System.in);

	    public int read() 
	    {
	        if (-1 == numChars)
	        {
	        	throw new InputMismatchException();
	        }
	        if (curChar >= numChars)
	        {
	            curChar = 0;
	            try 
	            {
	                numChars = bis.read(buf);
	            }
	            catch (IOException e)
	            {
	                throw new InputMismatchException();
	            }
	            if (numChars <= 0)
	            {
	            	return -1;
	            }
	        }
	        return buf[curChar++];
	    }

	    public int nextInt() 
	    {
	        int c = read();
	        while (isSpaceChar(c))
	        {
	        	c = read();
	        }
	        int sgn = 1;
	        if (c == '-') 
	        {
	            sgn = -1;
	            c = read();
	        }
	        int res = 0;
	        do 
	        {
	            if (c < '0' || c > '9')
	            {
	            	throw new InputMismatchException();
	            }
	            res *= 10;
	            res += c - '0';
	            c = read();
	        } while (!isSpaceChar(c));
	        return res * sgn;
	    }

	    private boolean isSpaceChar(int c) 
	    {
	        return ' ' == c || '\n' == c || '\r' == c || '\t' == c || -1 == c;
	    }
	}
}
