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.ArrayList;
import java.util.Arrays;
import java.util.List;

public class TwoSets
{
    static class Cislo implements Comparable<Cislo>
    {
        long hodnota;
        int povodnaPozicia;
        int aKamarat = -1;
        int bKamarat = -1;
        int flag = -1;

        public Cislo(long hodnota, int povodnaPozicia)
        {
            this.hodnota = hodnota;
            this.povodnaPozicia = povodnaPozicia;
        }

        @Override
        public int compareTo(Cislo o)
        {
            return Long.compare(hodnota, o.hodnota);
        }
    }

    public static void main(String[] args) throws IOException
    {
        //System.setIn(new FileInputStream(new File("C:\\Users\\Patrik\\Desktop\\Everything\\MyProjects\\JavaProjects\\Codeforces\\src\\test")));
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String[] riadok = br.readLine().split(" ");
        int n = Integer.parseInt(riadok[0]);
        long a = Long.parseLong(riadok[1]);
        long b = Long.parseLong(riadok[2]);
        riadok = br.readLine().split(" ");
        final Cislo[] cisla = new Cislo[n];
        for (int i = 0; i < n; i++)
            cisla[i] = new Cislo(Long.parseLong(riadok[i]), i);

        Arrays.sort(cisla);
        long[] hodnoty = new long[n];
        for (int i = 0; i < n; i++)
            hodnoty[i] = cisla[i].hodnota;

        List<Integer> jednokamaratove = new ArrayList<>();

//        System.out.println(Arrays.toString(hodnoty));

        for (int i = 0; i < n; i++)
        {
            int prve = Arrays.binarySearch(hodnoty, a - hodnoty[i]);
            int druhe = Arrays.binarySearch(hodnoty, b - hodnoty[i]);

            if (prve >= 0)
                cisla[i].aKamarat = prve;

            if (druhe >= 0)
                cisla[i].bKamarat = druhe;

            if ((prve < 0 && druhe >= 0) || (prve >= 0 && druhe < 0))
                jednokamaratove.add(i);

            if (prve < 0 && druhe < 0)
            {
                System.out.println("NO");
                return;
            }
        }

        if (a == b)
        {
            System.out.println("YES");
            System.out.print(0);
            for (int i = 1; i < n; i++)
                System.out.print(" 0");
            return;
        }

//        for (int i = 0; i < n; i++)
//        {
//            String aa = cisla[i].aKamarat == -1 ? "N" : cisla[cisla[i].aKamarat].hodnota + "";
//            String bb = cisla[i].bKamarat == -1 ? "N" : cisla[cisla[i].bKamarat].hodnota + "";
//            String j = jednokamaratove.contains(i) ? ", je jednokamaratove" : "";
//            System.out.println("Cislo " + cisla[i].hodnota + " ma kamaratov [" + aa + "," + bb + "]" + j);
//        }

        for (Integer index : jednokamaratove)
        {
            Cislo cislo = cisla[index];

            if (cislo.flag != -1)
                continue;

            boolean dalsiJeAKamarat = cislo.aKamarat != -1;
            int mnozina = cislo.aKamarat != -1 ? 0 : 1;

            int pocet = 0;

            while (true)
            {
                pocet++;
                cislo.flag = mnozina;

                if (dalsiJeAKamarat)
                {
                    if (cislo.aKamarat == -1)
                        break;

                    cislo = cisla[cislo.aKamarat];
                }
                else
                {
                    if (cislo.bKamarat == -1)
                        break;

                    cislo = cisla[cislo.bKamarat];
                }

                dalsiJeAKamarat = !dalsiJeAKamarat;
            }

            if (pocet % 2 == 1)
            {
                System.out.println("NO");
                return;
            }
        }

        int[] vysledok = new int[n];
        for (int i = 0; i < n; i++)
            vysledok[cisla[i].povodnaPozicia] = cisla[i].flag;
        System.out.println("YES");
        System.out.print(vysledok[0]);
        for (int i = 1; i < n; i++)
            System.out.print(" " + vysledok[i]);
    }
}