#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#define int long long
#define ll long long
#define F(type, i, a, b, incr) for (type i = a; i <= (type)(b); i += (type)(incr))
#define RF(type, i, a, b, decr) for (type i = a; i >= (type)(b); i -= (type)(decr))
#define sz(a) sizeof(a)
#define deb(a) cerr << " [" << #a << "->" << a << "] "
#define next_line cerr << '\n'
#define all(a) a.begin(), a.end()
#define iter(it, s) for (auto it = s.begin(); it != s.end(); it++)
#define setbits(x) __builtin_popcountll(x)
using namespace __gnu_pbds;
using namespace std;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;
typedef pair<int, int> pii;
typedef pair<ll,ll> pll;

/*
1. If you cannot approach a problem
directly in the way it is proposed 
then try to think from backwards
2. Have you checked the implementation 
before starting to write the code?
3. Have you read the question carefully ?
4. Keep the names of variable descriptive.
5. Check the types and range of the values properly
6. Erase a iterator in the set or map only after using its value.
7. 1 bitset of 1e9 size only takes 256 mb.
8. Try to use global variables in case of recursion
9. Short and precise exectutes faster
*/

void solve()
{
    int n,s,d;
    cin >>n >> s >> d;
    F(int, i, 0, n - 1,1 ){
        int x, y;
        cin >> x >> y;
        if((x < s) && (y > d)){
            cout << "Yes\n";
            return;
        }
    }
    cout <<"No\n";
}

signed main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    #ifndef ONLINE_JUDGE
        // freopen("input.txt", "r", stdin);
        // freopen("output.txt", "w", stdout);
        // freopen("Debug.txt", "w", stderr);
    #else
    #endif
    // cout << fixed << setprecision(10);
    // int _t;
    // cin>>_t;
    // while(_t --)
        solve();
}

/*                 -> Bismillahir Rahmanir Rahim <-                */

#include <bits/stdc++.h>
using namespace std;
//Some Hints
//Find odd and even return 1 || 0
// __builtin_parity() if x is ll use __builtin_parityll(x)
#define gcd(a, b) __gcd(a, b)
#define lcm(a, b) (a * (b / gcd(a, b)))
// count how many 0 in a bynary number
#define NumOf0(x) __builtin_popcount(x)
// count how many 1 in a bynary number
#define NumOf1(x) __builtin_ctz(x)
#define pi acos(-1)
typedef long long ll;
typedef unsigned long long ull;
typedef unsigned un;
#define Bismilla                      \
    ios_base::sync_with_stdio(false); \
    cin.tie(NULL);                    \
    cout.tie(NULL)
bool isPrime(int n)
{
    if (n < 2)
    {
        return false;
    }
    if (n == 2 || n == 3)
    {
        return true;
    }
    if (n % 2 == 0)
    {
        return false;
    }
    for (ll i = 3; i * i <= n; i += 2)
    {
        if (n % i == 0)
        {
            return false;
        }
    }
    return true;
}
#define pb push_back
#define vi vector<int>
#define vl vector<ll>
#define In insert
#define mini(a, b) a = min(a, (b))
#define maxi(a, b) a = max(a, (b))
#define si(a) scanf("%d", &a)
#define si2(a, b) scanf("%d %d", &a, &b)
#define si3(a, b, c) scanf("%d %d %d", &a, &b, &c)
#define sl(a) scanf("%lld", &a)
#define sl2(a, b) scanf("%lld %lld", &a, &b)
#define sl3(a, b, c) scanf("%lld %lld %lld", &a, &b, &c)
#define ln "\n"
#define pf printf
#define endl "\n"
#define pfi(a) printf("%d\n", a)
#define pf2(a, b) printf("%d %d\n", a, b)
// Now Start.....:)

void solve()
{
    ll n, m, k, q, l, r, x, y, z;
    cin >> x >> y >> z;
    bool ok=false;
    for (int  i = 0; i < x; i++)
    {
        cin>>n>>m;
        if(n<y and m>z){
            ok = true;
        }
    }
    cout<<((ok)?"Yes":"No")<<ln;
}

int main()
{
    Bismilla;
    solve();
}
