#include <bits/stdc++.h>
using namespace std;
int n, m, x, y;
int z[250];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(z, 0, sizeof z);
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    x *= 2;
    y *= 2;
    for (int j = x; j <= y; j++) z[j] = 1;
  }
  m *= 2;
  bool found = true;
  for (int i = 0; i <= m; i++)
    if (z[i] == 0) found = false;
  if (found)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
