#include <bits/stdc++.h>
using namespace std;
int n, m, a[105], l, r, ch, dis = -1;
int main() {
  cin >> n >> m;
  while (n--) {
    cin >> l >> r;
    if (l == 0) ch++, dis = max(dis, r);
    ;
    if (l > dis) return cout << "NO\n", 0;
    if (r >= m && ch > 0) return cout << "YES\n", 0;
    dis = max(dis, r);
  }
  cout << "NO\n";
  return 0;
}
