#include <bits/stdc++.h>
using namespace std;
typedef string str;
typedef long long ll;
typedef double db;
typedef pair<int,int> pi;
#define fi first
#define se second
#define int ll
#define all(x) begin(x), end(x)
typedef vector<int> vi;
typedef vector<str> vs;
#define pb push_back
#define rall(x) rbegin(x), rend(x)
#define pf push_front
#define lb lower_bound
#define ub upper_bound
#define mp make_pair
#define sz(x) (int)x.size()
#define endl "\n"
#define boost ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0)
#define FOR(i,a,b) for (int i = (a); i < (b); ++i)
#define ROF(i,a,b) for (int i = (b)-1; i >= (a); --i)
void IO(){
#ifndef ONLINE_JUDGE 
    freopen("D:///docs///coding///c++///codes///input.txt", "r", stdin); 
    freopen("D:///docs///coding///c++///codes///output.txt", "w", stdout); 
#endif 
}
int32_t main(){
// IO();
boost;
	int n,s,d; cin>>n>>s>>d;
	FOR(i,0,n)
	{
		int a,b; cin>>a>>b;
		if(a<s && b>d)
		{
			cout<<"Yes"<<endl;
			return 0;
		}
	}
	cout<<"No"<<endl;
return 0;
}
//  check data type
//  return function at recursions
#include <iostream>

using namespace std;

int main()
{
    int n, s, d;
    cin >> n >> s >> d;
    bool ans = false;

    for (int i = 0; i < n; i++)
    {
        int x, y;
        cin >> x >> y;
        if (x < s && y > d)
        {
            ans = true;
        }
    }

    if (ans)
    {
        cout << "Yes" << endl;
    }
    else
    {
        cout << "No" << endl;
    }
    return 0;
}