#include <bits/stdc++.h>
using namespace std;

void solve(){
    int n, s, d; cin>>n>>s>>d;
    for(int i=0; i < n; i++){
        int x, y; cin>>x>>y;
        if (x < s && y > d) {
            cout<<"Yes";
            return;
        }
    }
    cout<<"No";
    
}

int main(){

#ifdef USE_FILE_IO
    freopen("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif

#ifndef USE_FILE_IO
    ios_base::sync_with_stdio(0); cin.tie();
#endif

    solve();
}
#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;
}
