/*
 * Hopefully this is AC :D
 */

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.StringTokenizer;
import java.util.Arrays;

public class TwoSets {

	static ArrayList<Integer> g[];
	static boolean visited[];
	static int ans[],p[],orig[];
	static int n,a,b;
	
	@SuppressWarnings("unchecked")
	public static void main(String args[] ) throws Exception {
		
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	    PrintWriter w = new PrintWriter(System.out);
	        
	    StringTokenizer st1 = new StringTokenizer(br.readLine());
	    n = ip(st1.nextToken());
	    a = ip(st1.nextToken());
	    b = ip(st1.nextToken());
	    
	    g = new ArrayList[n];
	    visited = new boolean[n];
	    ans = new int[n];
	    p = new int[n];
	    orig = new int[n];
	    
	    StringTokenizer st2 = new StringTokenizer(br.readLine());
	    for(int i=0;i<n;i++){
	    	p[i] = ip(st2.nextToken());
	    	orig[i] = p[i];
	    	g[i] = new ArrayList<Integer>();
	    }
	    
	    Arrays.sort(p);
	    
	    boolean impossible = false;
	    
	    for(int i=0;i<n;i++){
	    	int i1 = Arrays.binarySearch(p, a-p[i]);
	    	int i2 = Arrays.binarySearch(p, b-p[i]);
	    	if(i1 < 0 || i1 >= n)	i1 = -1;
	    	if(i2 < 0 || i2 >= n)	i2 = -1;
	    	
	    	if(i1 == -1 && i2 != -1) //if only (b-x) present then both must belong to set 1
	    		g[i].add(i2);
	    	
	    	else if(i1 != -1 && i2 == -1) //if only (a-x) present then both must belong to set 0
	    		g[i].add(i1);
	    	
	    	else if(i1 != -1 && i2 != -1){ //both present hence all 3 should be in same set,doesn't matter which
	    		g[i].add(i1);
	    		g[i].add(i2);
	    	}
	    	else{ //if none present then not possible to be in any set
	    		impossible = true;
	    		break;
	    	}
	    }
	   
	    if(impossible){//if any element without both a-x and b-x found
	    	System.out.println("NO");
	    	return;
	    }
	    
	    //Edge between a and b means... What is the time complexity of the previous code?