#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long int
#define ld long double 
#define pb push_back
#define pob pop_back
#define ub upper_bound
#define lb lower_bound
#define mp make_pair
#define f0(i,n) for(i=0;i<n;i++)
#define rf0(i,n) for(i=n-1;i>=0;i--)
#define f2(i,n) for(i=1;i<n;i++)
#define f1(i,n) for(i=1;i<=n;i++)
#define fab(i,a,b) for(i=a;i<=b;i++)
#define shr  ll t;cin>>t; while(t--)
#define fi first
#define sc second
#define pll pair<ll,ll>
#define vll vector<ll>
#define vpll vector<pll>
#define all(v) v.begin(),v.end()
#define mod 1000000007
#define dev(a) for(auto it:a)cout<<it<<" "
#define prec(nm,prc) cout<<fixed<<setprecision(nm)<<prc<<" "
#define print(a) cout<<a<<"\n";
#define print2(a,b) cout<<a<<" "<<b<<"\n";
#pragma GCC optimization ("O3")
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#define nl cout<<"\n"
#define ye cout<<"Yes\n"
#define yee cout<<"YES\n"
#define no cout<<"No\n"
#define noo cout<<"NO\n"
#define ln length()
#define ms(cnt,r) memset(cnt, r, sizeof(cnt))
using namespace std;
bool comp(pll &a,pll &b)
{
    return (a.sc<b.sc);
}
ll power(ll n,ll p)
{
	if(p==0)
	return 1;
	else
	{
		ll ans=power(n,p/2)%mod;
		ans=(ans*ans)%mod;
		if(p%2==0)
		return ans;
		else
		return ans=(ans*n)%mod;
	}
}
bool isPrime(ll n) 
{ 
    if (n <= 1) 
        return false; 
    if (n <= 3) 
        return true; 
  
    if (n % 2 == 0 || n % 3 == 0) 
        return false; 
  
    for (ll i = 5; i * i <= n; i = i + 6) 
        if (n % i == 0 || n % (i + 2) == 0) 
            return false; 
  
    return true; 
} 
    /********************HAR HAR MAHADEV***********JAI BAJRANG BALI************************/
  int main()
 {
  	FAST;
  	/* ifstream cin;
    cin.open("input.txt");
    ofstream cout;
    cout.open("output.txt");
                      */
  	//shr
  	  {  
  	  	ll i,j,n,a,b,c,d,m,sum=0,ans=0,cnt=0,r=0,e=0;
  	  	string str,s1,om,s;
  	     unordered_map<ll,ll>mp,mp1;
  	     set<ll>st;
  	     cin>>n>>a>>b;
  	     
  	     f0(i,n)
  	     {
  	        cin>>r>>e;
  	        if(r<a&&e>b)cnt=1;
  	     }
  	    if(cnt)ye;
  	    else no;
  	     
  	     
  	  }
   	return 0;
  }                     
 
#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define vll vector<ll>
#define pll pair<ll,ll>
#define forA(i,a,n,x) for(ll i=a;i<n;i+=x)
#define forD(i,a,n,x) for(ll i=n-1;i>=a;i-=x)
#define ranit(it,n) for(auto it:n)
#define testCases ll t;cin>>t;while(t--)
#define mp make_pair
#define pb push_back
#define F first
#define S second
#define mod 1000000007
#define init(a,x) memset(a,x,sizeof(a))

int main()
{
    ios_base::sync_with_stdio(false);    cin.tie(NULL);    cout.tie(NULL);
    ll n,s,d;
    cin>>n>>s>>d;

    ll tdamage=0;

    while(n--)
    {
    	ll x,y;
    	cin>>x>>y;

    	if(x<s && y>d)tdamage|=1;
    }

    if(tdamage)cout<<"Yes";
    else cout<<"No";
    return 0;
}