// #include <bits/stdc++.h>
#include <algorithm>
#include <cmath>
#include <iostream>
#include <map>
#include <queue>
#include <vector>
#define int long long
#define all(a) a.begin(), a.end()
#define vi vector<int>
#define pii pair<int, int>
#define fe(i, a, b) for (int i = a; i <= (b); ++i)
#define fr(i, a, b) for (int i = b; i >= (a); --i)
using namespace std;

inline int in() {
    int s = 0, f = 0, ch = getchar();
    while (!isdigit(ch))
        f |= ch == '-', ch = getchar();
    while (isdigit(ch))
        s = (s << 3) + (s << 1) + (ch ^ 48), ch = getchar();
    return f ? -s : s;
}
const int N = 1e6 + 5;
const int mod = 4;
const int inf = 1ULL << 60;
int n, m, k;
int a[N], b[N], f[N];
int c[N];

int qp(int a, int b) {
    int sum = 1;
    while (b) {
        if (b & 1)
            sum = sum * a % mod;
        a = a * a % mod;
        b >>= 1;
    }
    return sum;
}
int inv(int a) {
    return qp(a, mod - 2);
}
bool flag[N];
int p[N], tot;

int find(int x) {
    return x == f[x] ? x : f[x] = find(f[x]);
}

struct node {
    int x, y;
    bool operator<(const node& b) const { return y > b.y; }
};

vector<pair<int, int>> g[N];
void work() {
    n = in();
    int s = in(), d = in();
    fe(i, 1, n) {
        int a = in(), b = in();
        if (a < s && b > d) {
            puts("Yes");
            return;
        }
    }
    puts("No");
}
signed main() {
#ifndef ONLINE_JUDGE
    freopen("1.in", "r", stdin);
    freopen("1.out", "w", stdout);
#endif
    // for (int _ = in(); _; --_)
    work();
    // system("pause");
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<(int)(n); i++)
#define ll long long

int main() {

    int N, S, D;
    cin >> N >> S >> D;
    int X[N], Y[N];
    rep(i, N) cin >> X[i] >> Y[i];

    rep(i, N) {
        if(X[i] < S && D < Y[i]) {
            cout << "Yes" << endl;
            return 0;
        }  
    }

    cout << "No" << endl;
    return 0;
}
