#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, i, a, b, j, flag = 1, prev;
  cin >> n >> m;
  int d[102];
  fill_n(d, 102, 0);
  for (i = 0; i < n; i++) {
    cin >> a >> b;
    d[a] = max(d[a], b);
  }
  i = 0;
  i = d[i], prev = 0;
  while (i != m) {
    a = 0;
    for (j = i; j > prev; j--) {
      if (d[j] >= m) {
        i = m;
        break;
      }
      if (d[j] > a) {
        a = d[j];
        b = j;
      }
    }
    if (i == m) break;
    if (a <= i) {
      flag = 0;
      break;
    }
    prev = b;
    i = a;
  }
  if (flag)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
