#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  int arr[n][2];
  int cont = 0;
  for (int i = 0; i < n; i++) {
    cin >> arr[i][0] >> arr[i][1];
  }
  if (arr[0][0] != 0) {
    cout << "no" << endl;
  } else {
    int i = 1;
    while (i <= m) {
      for (int x = 0; x < n; x++) {
        if (i > arr[x][0] && i <= arr[x][1]) {
          cont++;
        }
      }
      if (cont > 0) {
        i++;
      } else {
        break;
      }
      cont = 0;
    }
    if (i > m) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
}
