#include <cmath>
#include <cstdio>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <algorithm>

#include <map>
#include <set>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <vector>
#include <string>

#define il inline
#define re register
#define lc(p) p << 1
#define rc(p) p << 1 | 1
#define Mem(a, b) memset(a, b, sizeof(a));
#define For(a, b, c, d) for(re int a = b, a <= c;a = a + d);
#define foread(a, b) cin >> a;for(int i = 1;i <= a;i++) cin >> b[i];
#define forout(a, x, b, c) if(x) cout << a; for(int i = 1;i <= a;i++) cout << b[i] << c;
#define rep(a, b, c) for(re long long a = b;a <= c;a++)
#define per(a, b, c) for(re long long a = b;a >= c;a--)
#define IOS std::ios::sync_with_stdio(0)

using namespace std;

typedef long long ll;
typedef double ld;
typedef unsigned long long ull;

const int MAXN = 100005;
const int MAXM = 105;
const int INF = 0x3f3f3f3f;
const long long LNF = 0x3f3f3f3f3f3f3f3f;
const int MOD = 1e9 + 7;
const double PI = 3.141593;
const double E = 2.718282;
const double PHI = 1.618034;

int n, s, d;

int main(){
    cin >> n >> s >> d;
    for(int i = 1;i <= n;i++){
    	int x, y;
    	cin >> x >> y;
    	if(x < s && y > d){
    		cout << "Yes" << endl;
    		return 0;
		}
	}
	cout << "No" << endl;
    return 0;
}
#include "bits/stdc++.h"
using namespace std;

int main()
{
    int N, S, D;
    cin >> N >> S >> D;
    int flag    =0;
    for(int i=0; i<N; i++){
        int X, Y;
        cin>> X>> Y;
        if(X<S && Y>D){
            flag=1;
            cout << "Yes"<< endl;
            return 0;
        }
    }
    cout << "No"<< endl;
    
   
}