#include <cstdio>
#include <cassert>

const int maxn = 100010;

int n, m, a[maxn];

int main()
{
  freopen("sorting.in", "r", stdin);
  freopen("sorting.out", "w", stdout);

  assert(scanf("%d%d", &n, &m) == 2);
  assert(2 <= n && n <= 100000);
  assert(1 <= n && n <= 1000000000);
  for (int i = 0; i < n; i++)
  {
    assert(scanf("%d", &a[i]) == 1);
    assert(1 <= a[i] && a[i] <= 1000000000);
  }
  int ma = 0;
  for (int i = 0; i < n; i++)
  {
    if (ma > a[i] && ma + a[i] > m)
    {
      puts("No");
      return 0;
    }
    if (a[i] > ma)
      ma = a[i];
  }
  puts("Yes");
  
  return 0;
}
