#include <bits/stdc++.h>
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
    ll n, s, d;
    cin >> n >> s >> d;
    vector<ll> a(n), b(n);
    rep(i, n){
        cin >> a[i] >> b[i];
    }
    ll total = 0;
    rep(i, n){
        if(a[i] < s && b[i] > d){
            total += b[i];
        }
    }
    if(total > 0){
        cout << "Yes" << endl;
    }
    else{
        cout << "No" << endl;
    }
}

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

#define INF 1234567890
#define ll long long

int N, S, D;

int main()
{
	ios::sync_with_stdio(0); cin.tie(0);
	cin >> N >> S >> D;
	for(int i=1; i<=N; i++)
	{
		int x, y;
		cin >> x >> y;
		if (x >= S || y <= D) continue;
		cout << "Yes";
		return 0;
	}
	cout << "No";
	return 0;
}