#include <bits/stdc++.h>
#define rep(i, n) for(int i=0; i<(n); i++)
using namespace std;

int main(){
	int N,S,D,ff=0;
	vector<int> X,Y;
	//vector<vector<vector<int>>> dp;
	//long long amt=0;
	//string s;
	int ans=0;

	cin >> N >> S >> D;
	X = Y = vector<int>(N);
	//A.at(0) = A.at(0) = 0;

	for(int i=0; i<N; i++){
		cin >> X.at(i) >> Y.at(i);
		if(X.at(i)<S && Y.at(i)>D){
			ff=1;
		}
	}

	if(ff==1){
		cout << "Yes";
	}else{
		cout << "No";
	}

	//cout << ans;
}
#include <bits/stdc++.h>
using namespace std;
#define gc getchar_unlocked
#define ll long long
#define PI 3.1415926535897932384626
#define si(x) scanf("%d", &x)
#define sl(x) scanf("%lld", &x)
#define ss(s) scanf("%s", s)
#define pi(x) printf("%d\n", x)
#define pl(x) printf("%lld\n", x)
#define ps(s) printf("%s\n", s)
#define br printf("\n")
#define fo(i, n) for (i = 0; i < n; i++)
#define Fo(i, k, n) for (i = k; k < n ? i < n : i > n; k < n ? i += 1 : i -= 1)
#define deb(x) cout << #x << " = " << x << endl;
#define deb2(x, y) cout << #x << " = " << x << ", " << #y << " = " << y << endl
#define deba(i, a, n) \
	fo(i, n) { cout << a[i] << " "; }
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
#define clr(x) memset(x, 0, sizeof(x))
#define sortall(x) sort(all(x))
#define tr(it, x) for (auto it = x.begin(); it != x.end(); it++)
#define trr(it, x) for (auto it = x.rbegin(); it != x.rend(); it +)
typedef pair<int, int> pii;
typedef pair<ll, ll> pl;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<pii> vpii;
typedef vector<pl> vpl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;

const int MOD = 1000000007;
const int INF = 1000000009;
const int N = 300050;

ll fpow(ll x, ll n) {
	ll res = 1;
	while (n) {
		if (n & 1) {
			res = res * x % MOD;
		}
		x = x * x % MOD;
		n >>= 1;
	}
	return (res % MOD);
}

ll binomialCoeff(ll n, ll k) {
	ll C[n + 1][k + 1];
	ll i, j;

	for (i = 0; i <= n; i++) {
		for (j = 0; j <= min(i, k); j++) {
			// Base Cases
			if (j == 0 || j == i)
				C[i][j] = 1;

			else
				C[i][j] = (C[i - 1][j - 1] + C[i - 1][j]) % MOD;
		}
	}

	return C[n][k];
}

int gcd(int a, int b) {
	if (b == 0)
		return a;
	return gcd(b, a % b);
}

int lcm(int a, int b) {
	return a * (b / gcd(a, b));
}


void create_fac(int n) {
	vector<int> fac(N), inv(N);
	fac[0] = inv[0] = 1;
	for (int i = 1; i <= n; i++) {
		fac[i] = fac[i - 1] * i % MOD;
		inv[i] = fpow(fac[i], MOD - 2);
	}
}

void sieve(int n)  // linear sieve
{
	vector<int> primes;
	bool prime[N];
	for (int i = 2; i < n; ++i) {
		if (prime[i])
			primes.push_back(i);
		for (int j = 0; j < primes.size() && i * primes[j] < n; ++j) {
			prime[i * primes[j]] = false;
			if (i % primes[j] == 0)
				break;
		}
	}
}

/* ========== YOUR CODE HERE ========= */

//void solution() {
string solution() {
	ll n = 0, s = 0, d = 0;
	cin >> n >> s >> d;

	ll a[n], b[n];

	for (ll i = 0; i < n; i++) {
		cin >> a[i] >> b[i];
	}
	for (ll i = 0; i < n; i++) {
		if (a[i] < s && b[i] > d)
			return "Yes";
	}
	return "No";
}

/* ========== YOUR CODE HERE ========= */

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);

	int t = 1;
	// cin >> t;
	while (t--) {
		cout << solution() << endl;
		//        solution();
	}

	return 0;
}
