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

using ll = long long;
using vi = vector<int>;
using vll = vector<ll>;
using vb = vector<bool>;
using vvi = vector<vi>;
using vvll = vector<vll>;
using vvb = vector<vb>;
using pll = pair<ll,ll>;

int main(){
    int n;
    vll x(n),y(n);
    ll s,d;
    cin >> n >> s >> d;
    for (int i = 0; i < n; i++)
    {
        cin >> x[i] >> y[i];
    }
    string ans = "No";
    for (int i = 0; i < n; i++)
    {
        if (x[i] < s && y[i] > d)
        {
            ans = "Yes";
        }
    }
    cout << ans << endl;
}
#include <bits/stdc++.h>
#define _GLIBCXX_DEBUG
using namespace std;
typedef long long ll;
#define INF 1e9
#define rep(i, n) for(int i = 0; i < n; i++)
#define repr(i, n) for(int i = n; i >= 0; i--)
#define FOR(i, m, n) for(int i = m; i < n; i++)
#define all(x) (x).begin(),(x).end()
 
int main() {
    ll N,S,D;
    cin >> N >> S >> D;
    bool ans = false;
    rep(i, N) {
        ll X,Y;
        cin >> X >> Y;
        if (X < S) if (Y > D) ans = true;
    }
    if (ans) cout << "Yes" << endl;
    else cout << "No" << endl;
}