#include<iostream>
using namespace std;
int main(){
long long int i, n,s,p,count=0;
cin>>n>>s>>p;
//max1=max(y,w);
long long int a[n],b[n];
for(i=0;i<n;i++ ){


    cin>>a[i]>>b[i];
    if(a[i]<s && b[i]>p){

        count=1;
        cout<<"Yes";
        break;
    }
}
if(count==0){
        cout<<"No";


}
}

#include<bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;++i)
#define rrep(i,n) for(int i=n-1;i>=0;--i)
#define yesno(flg) if(flg){cout<<"YES"<<endl;}else{cout<<"NO"<<endl;}
#define MAX_N 100001
#define i197 1000000007

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P1;
typedef pair<int,int> Pi;
typedef pair<ll,Pi> Pli;
typedef pair<Pi,Pi> Pi2;
typedef pair<P1,ll>P2;
const ll INF=1000000000000000001;
struct edge{int to,cost;};
int dy[]={0, 0, 1, -1};
int dx[]={1, -1, 0, 0};
struct Road{double cost;int a,b;};
struct pos{
	// 1 変数を入れる;
	int t,x,y;
};
int main(){

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

	return 0;
}
