#include <bits/stdc++.h>
using namespace std;
const int MN = 110;
int a[MN];
int b[MN];
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  int N, K;
  cin >> N >> K;
  int maxB = -1;
  for (int i = 1; i <= N; i++) {
    cin >> a[i] >> b[i];
    maxB = max(maxB, b[i]);
  }
  if (a[1] > 0 || maxB < K) {
    cout << "NO\n";
    return 0;
  } else {
    maxB = b[1];
    if (maxB >= K) {
      cout << "YES\n";
      return 0;
    }
    for (int i = 2; i <= N; i++) {
      if (a[i] > maxB) {
        cout << "NO\n";
        return 0;
      }
      maxB = max(maxB, b[i]);
      if (maxB >= K) {
        cout << "YES\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
