#define _USE_MATH_DEFINES
#include <bits/stdc++.h>

using namespace std;
using ll = long long;

int n,s,d;

int main(void){
    ios::sync_with_stdio(0);
    cin.tie(0); cout.tie(0);

    cin >> n >> s >> d;
    bool ans = false;
    for(int i=0;i<n;i++){
        int x,y;
        cin >> x >> y;
        if(x<s&&y>d) ans = true;
    }
    if(ans) cout << "Yes";
    else cout << "No";
    return 0;
}
#include <bits/stdc++.h>

#define REP(i, n) for(int i = 0; i < n; i++)
#define REPR(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define N 110

using namespace std;
using ll = long long;
using P = pair<int,int>;

int main(){
  int n,s,d,flag=0;
  int x,y;
  cin >> n >> s  >> d;
  REP(i,n)
  {
    cin >> x >> y;
    if(x<s && y>d)
    {
      cout << "Yes" << endl;
      return 0;
    }
  }
      cout << "No" << endl;
      return 0;
}
