// Задача "Станция "Сортировочная"
// XVII командный чемпионат школьников Санкт-Петербурга по программированию
// Автор задачи: Антон Ахи
// Автор решения: Антон Ахи, akhi@rain.ifmo.ru
import java.io.*;
import java.util.*;
import java.math.*;

public class sorting_aa implements Runnable {

	public static void main(String[] args) {
		new Thread(new sorting_aa()).start();
	}

	BufferedReader br;
	StringTokenizer st;
	PrintWriter out;
	boolean eof = false;
	Random rand = new Random(this.hashCode());

	public void run() {
		Locale.setDefault(Locale.US);
		try {
			br = new BufferedReader(new FileReader(FNAME + ".in"));
			out = new PrintWriter(FNAME + ".out");
			solve();
			out.close();
		} catch (Throwable e) {
			e.printStackTrace();
			System.exit(566);
		}
	}

	String nextToken() {
		while (st == null || !st.hasMoreTokens()) {
			try {
				st = new StringTokenizer(br.readLine());
			} catch (Exception e) {
				eof = true;
				return "0";
			}
		}
		return st.nextToken();
	}

	int nextInt() {
		return Integer.parseInt(nextToken());
	}

	void myAssert(boolean u, String message) {
		if (!u) {
			throw new Error("Assertion failed!!! " + message);
		}
	}

	int inBounds(int x, int l, int r, String name) {
		myAssert(l <= x && x <= r, name + " not in bounds!!! " + x
				+ " not in [" + l + ".." + r + "]");
		return x;
	}

	String FNAME = "sorting";

	private void solve() throws IOException {
		int n = inBounds(nextInt(), 2, 100000, "n");
		int m = inBounds(nextInt(), 1, 1000000000, "M");
		int[] a = new int[n];
		HashSet<Integer> hs = new HashSet<Integer>();
		for (int i = 0; i < a.length; i++) {
			a[i] = inBounds(nextInt(), 1, 1000000000, "m[" + (i + 1) + "]");
			hs.add(a[i]);
		}
		myAssert(hs.size() == n, "There are equal elements!!!");
		int max = 0;
		for (int i = 0; i < a.length; i++) {
			if (max > a[i] && a[i] + max > m) {
				out.println("No");
				return;
			}
			max = Math.max(max, a[i]);
		}
		out.println("Yes");
	}

}
