#include <bits/stdc++.h>
using namespace std;
int const N = 100 + 10;
int n, m, a[N], b[N];
bool mark[N];
void read_input() {
  cin >> n >> m;
  for (int i = 0; i < n; i++) cin >> a[i] >> b[i];
}
void solve() {
  mark[0] = true;
  for (int i = 0; i < n; i++) {
    if (!mark[a[i]]) {
      cout << "NO\n";
      return;
    }
    for (int j = a[i]; j <= b[i]; j++) mark[j] = true;
  }
  cout << (mark[m] ? "YES\n" : "NO\n");
}
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  read_input(), solve();
}
