#include <bits/stdc++.h>
#define fastio()                  \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0)
#define pb push_back
#define show(x) cout << (#x) << " : " << x << endl;
#define ll long long
#define ull unsigned long long
#define ld long double
#define pow power
#define mp make_pair
#define ff first
#define ss second
#define pii pair<ll, ll>
#define sq(x) ((x) * (x))
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
#define siz(a) int((a).size())
#define For(i,a,b) for(int (i)=(a);(i) < (b); ++(i))
#define endl "\n"
#define pi 3.14159265
const ll mod = 1000 * 1000 * 1000 + 7;
const ll mod1 = 998244353;
const ll INF     = 1ll*1000*1000*1000*1000*1000*1000 + 7; 
using namespace std;

ll power(ll x, ll y) 
{ 
   ll res = 1;      
  
   
    while (y > 0) 
    { 
       
        if (y & 1) 
            res = (long long)(res*x); 
  

        y = y>>1; 

        x = (long long)(x*x);

        //cout<<x<<'\n'; 
    } 
    return res; 
} 



// Stolen Templates
template <typename T>
T MIN(T first) { return first; }

template <typename T, typename... Args>
T MIN(T first, Args... args) { return min(first, MIN(args...)); }


template <typename T>
T MAX(T first) { return first; }

template <typename T, typename... Args>

T MAX(T first, Args... args) { return max(first, MAX(args...)); }
// Stolen Templates end here




int main()
{

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

fastio();

    ll n,s,d;
    cin>>n>>s>>d;

    For(i,0,n) {
        ll x,y;
        cin>>x>>y;
        if (x<s and y>d) {
            cout<<"Yes";
            return 0;
        }
    }

    cout<<"No";

return 0;
}

// check all product based operations for integer overflow
// careful of renamed variables especially in loops









#include<iostream>
#define int long long
using namespace std;

signed main()
{
    int n,s,d;
    cin>>n>>s>>d;
    bool flag=0;
    for(int i=0;i<n;i++)
    {
    	int j,k;
    	cin>>j>>k;
    	if(j<s&&k>d)
    	{
    		flag=1;
    	}
    }
    if(flag)
    	cout<<"Yes";
    else
    	cout<<"No";
	return 0;
}