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.*;

public class CodeForces {
  static boolean ONLINE_JUDGE = System.getProperty("ONLINE_JUDGE") != null;
  int a = 0, b = 0, n = 0;

  void runCase(int caseNum) throws IOException {
    n = nextInt();
    a = nextInt();
    b = nextInt();

    int[] p = new int[n];
    Map<Integer, Integer> pos = new HashMap<>();
    for (int i = 0; i < n; ++i) {
      p[i] = nextInt();
      pos.put(p[i], i);
    }
    int[] m = new int[n];
    for (int i = 0 ; i < n; ++i) {
      if (m[i] != 0) {
        continue;
      }
      boolean ok = false;
      List<Integer> path = new ArrayList<>();
      if (pos.containsKey(a - p[i])) {
        Set<Integer> visited = new HashSet<>();
        path.add(i);
        visited.add(i);
        if (augment(p, m, pos, pos.get(a - p[i]), path, visited)) {
          ok = true;
        }
      }
      if (!ok && pos.containsKey(b - p[i])) {
        path = new ArrayList<>();
        Set<Integer> visited = new HashSet<>();
        path.add(i);
        visited.add(i);
        if (augment(p, m, pos, pos.get(b - p[i]), path, visited)) {
          ok = true;
        }
      }
      if (!ok) {
        System.out.println("NO");
        return;
      }
      for (int j = 0; j < path.size(); j += 2) {
        if (p[path.get(j)] + p[path.get(j + 1)] == a) {
          m[path.get(j)] = m[path.get(j + 1)] = 1;
        } else if (p[path.get(j)] + p[path.get(j + 1)] == b) {
          m[path.get(j)] = m[path.get(j + 1)] = 2;
        }
      }
    }
    System.out.println("YES");
    for (int i = 0; i < n; ++i) {
      System.out.print(m[i] - 1);
      System.out.print(" ");
    }
  }

  boolean augment(int[] p, int[] m, Map<Integer, Integer> pos, int current, List<Integer> path, Set<Integer> visited) {
    boolean in = true;
    while (true) {
      path.add(current);
      if (m[current] == 0) {
        return true;
      }
      if (visited.contains(current)) {
        return false;
      }
      visited.add(current);
      int next = 0;
      if (in) {
        if (m[current] == 1) {
          if (!pos.containsKey(a - p[current])) {
            return false;
          }
          next = pos.get(a - p[current]);
        } else {
          if (!pos.containsKey(b - p[current])) {
            return false;
          }
          next = pos.get(b - p[current]);
        }
      } else {
        if (m[current] == 1) {
          if (!pos.containsKey(b - p[current])) {
            return false;
          }
          next = pos.get(b - p[current]);
        } else {
          if (!pos.containsKey(a - p[current])) {
            return false;
          }
          next = pos.get(a - p[current]);
        }
      }
      if (current == next)
        return true;
      current = next;
      in = in ? false : true;
    }
  }

  public static void main(String[] args) throws IOException {
    if (ONLINE_JUDGE) {
      in = new BufferedReader(new InputStreamReader(System.in));
      out = new PrintWriter(System.out);
    } else {
      in = new BufferedReader(new FileReader("input.txt"));
      out = new PrintWriter(System.out);
      //out = new PrintWriter("output.txt");
    }
    new CodeForces().runIt();
    out.flush();
    out.close();
    return;
  }

  static BufferedReader in;
  private StringTokenizer st;
  static PrintWriter out;

  static int pos;
  static String curInput = "";

  String next() throws IOException {
    while (!st.hasMoreTokens()) {
      String line = in.readLine();
      if (line == null) {
        return null;
      }
      st = new StringTokenizer(line);
    }
    return st.nextToken();
  }

  int nextInt() throws IOException {
    return Integer.parseInt(next());
  }

  double nextDouble() throws IOException {
    return Double.parseDouble(next());
  }

  long nextLong() throws IOException {
    return Long.parseLong(next());
  }


  void runIt() throws IOException {
    st = new StringTokenizer("");

//        int N = nextInt();
//        for (int i = 0; i < N; i++) {
//            runCase(i + 1);
//        }
    runCase(0);
    out.flush();
  }

}