#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[1005];
int v[105];
int main() {
  int n, m;
  cin >> n >> m;
  v[0] = 1;
  for (int i = 1; i <= n; i++) {
    cin >> a[i].first >> a[i].second;
    if (v[a[i].first] != 0)
      for (int j = a[i].first; j <= a[i].second; j++) {
        v[j] = 1;
      }
  }
  for (int i = 0; i <= m; i++) {
    if (v[i] == 0) {
      cout << "NO" << '\n';
      return 0;
    }
  }
  cout << "YES" << '\n';
  return 0;
}
