#include<bits/stdc++.h>
using namespace std;
  
int main(){
  int n, s, d;
  cin >> n >> s >> d;
  string ans = "No";
  for(int i = 0; i < n; i++){
    int x, y;
    cin >> x >> y;
    if(x < s && y > d){
      ans = "Yes";
      break;
    }
  }
  cout << ans << endl;
  return 0;
}
#include<bits/stdc++.h>
using namespace std;
//kaizen_philosopher
//Al Waris
/*-----------------------------------------------------------------------*/
#define fastio ios::sync_with_stdio(false);cin.tie(0); 
#define ll long long int
//loops
#define lp0(i,a) for(i=0;i<a;i++)
#define lp1(i,a) for(i=1;i<=a;i++)
//file input output(T.N.T.I)
#define f_input freopen("input.txt","r",stdin)
#define f_output freopen("output.txt","w",stdout)
#define pb push_back
#define vi vector<int>
#define vll vector<ll>
#define vs vector<string>
#define vc vector<char>
#define si stack<int>
#define qi queue<int>
#define sq(a) ((a)*(a))
#define sf scanf
#define pf printf
#define endl "\n"
const double pi=acos(-1);
/*---------------------------------------------------------------------*/

void solve(){
    ll a,x,y,i,j;
    cin>>a>>x>>y;
    ll ar[a][2];
    lp0(i,a){
        cin>>ar[i][0];
        cin>>ar[i][1];
    }
    
    bool flag=false;
    
    lp0(j,a){
        if(ar[j][0]<x && ar[j][1]>y) flag=true;
    }
    if(flag==true)cout<<"Yes"<<endl;
    else cout<<"No"<<endl;
    
    
}

int main(){
    fastio
    int t=1;
    
    while(t--)solve();
    return 0;
}
