#include <bits/stdc++.h>
using namespace std;
int acessiveis[110], visitado[110];
map<int, vector<int> > existeTp;
int main() {
  int teleports, i, location, l, limit, posAtual = 0;
  bool possible;
  scanf("%d %d", &teleports, &location);
  vector<pair<int, int> > tps;
  possible = false;
  for (i = 0; i < teleports; i++) {
    scanf("%d %d", &l, &limit);
    tps.push_back(make_pair(l, limit));
    if (location >= l and location <= limit) possible = true;
    existeTp[l].push_back(i);
  }
  queue<int> move;
  move.push(0);
  if (existeTp.find(0) == existeTp.end()) {
    printf("NO\n");
    return 0;
  }
  while (not move.empty()) {
    int atual = move.front();
    move.pop();
    if (atual == location) {
      printf("YES\n");
      return 0;
    }
    if (visitado[atual]) continue;
    visitado[atual] = 1;
    for (i = 0; i < existeTp[atual].size(); i++) {
      int indexDoTp = existeTp[atual][i];
      for (int j = tps[indexDoTp].first; j <= tps[indexDoTp].second; j++)
        move.push(j);
    }
  }
  printf("NO\n");
  return 0;
}
