#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  int a[n], b[n];
  int visited[205] = {0};
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    for (int i = 2 * a; i <= 2 * b; i++) visited[i] = 1;
  }
  int flag = 0;
  for (int i = 0; i <= 2 * m; i++) {
    if (visited[i] == 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES";
}
