import java.util.*;

class solution {
	public static void main(String [] args) {
		Scanner sc = new Scanner(System.in);
		int N = 1 << sc.nextInt();
		int dudu = sc.nextInt();
		boolean exists = false;
		for (int i = 1; i < N; i++) {
			int x = sc.nextInt();
			if (x <= dudu) exists = true;
		}
		if (exists || N == 1) System.out.println("YES");
		else System.out.println("NO");
	}
}
