#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  int dot[101] = {};
  int temp = -1;
  int temp1 = -1;
  bool solution = false;
  cin >> n >> m;
  for (int i = 1; i <= n; ++i) {
    cin >> temp >> temp1;
    dot[temp] = ((dot[temp] < temp1) ? temp1 : dot[temp]);
  }
  temp = 0;
  int target = 0;
  while (temp <= target) {
    if (dot[temp] > target) target = dot[temp];
    if (target >= m) {
      solution = true;
      break;
    }
    temp++;
  }
  cout << ((solution) ? "YES" : "NO") << endl;
  return 0;
}
