#include <bits/stdc++.h>
using namespace std;
 
typedef long double ld;									
const long long inf = 1100000000000000000;
#define maxn 1000005
#define mod 1000000007 //998244353
#define int long long
#define PB push_back
#define eb emplace_back
#define all(c) (c).begin(),(c).end()
#define pii pair <int,int>
#define vi vector<int>
#define F first
#define S second
#define rep(i,a,b)  for(int i=a;i<b;i++)
#define rep1(i,a,b) for(int i=a;i<=b;i++)
#define repd(i,a,b) for(int i=a;i>=b;--i)
#define sz(x) (int)((x).size())  
#define mem(a,x) memset(a,x,sizeof(a))
const long double PI=3.141592653589793238462643383279502884197169399375105820974944;

void solve(){
	int n, s, d; cin>>n>>s>>d;
	int ck = 0;
	rep(i, 0, n){
		int x, y; cin>>x>>y;
		if(s > x and y > d) ck = 1;
	}
	if(ck) cout<<"Yes";
	else cout<<"No";
}

signed main(){
    ios_base::sync_with_stdio(false), cin.tie(nullptr); 
    int T=1; //cin>>T; 
    while(T--){
        solve();cout<<'\n';
    }
    return 0;
}
#include <bits/stdc++.h>

using namespace std;

int main()
{
	
	int n,s,d ,x,y,m=0;
	
	cin >> n >> s >> d;
	

	while(n--)
	{
	cin >> x >> y;
	
	if(x<s && y >d)	
	{
		m=1;
		break;
	}
	}
	
	if(m==1)
	{
		cout << "Yes" << endl;
	}
	else
	cout << "No" << endl;
	return 0;
}