#include <bits/stdc++.h>
//#include <atcoder/all>

using namespace std; 

typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef vector<PII> VPII;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<LL, LL> PLL;
typedef vector<PLL> VPLL;
typedef priority_queue<LL> PQ_DESC;
typedef priority_queue<LL, VL, greater<LL>> PQ_ASC;
typedef priority_queue<PII> PQ_DESC_PII;
typedef priority_queue<PII, vector<PII>, greater<PII>> PQ_ASC_PII;
typedef priority_queue<VL> PQ_DESC_VL;
typedef priority_queue<VL, vector<VL>, greater<VL>> PQ_ASC_VL;
typedef priority_queue<PLL> PQ_DESC_PLL;
typedef priority_queue<PLL, vector<PLL>, greater<PLL>> PQ_ASC_PLL;

#define ALL(c) (c).begin(),(c).end()
#define PB push_back
#define MP make_pair
#define SORT_ASC(c) sort(ALL(c))
//#define SORT_DESC(c) sort(ALL(c), greater<typeof(*((c).begin()))>())
#define SORT_DESC(c) sort((c).rbegin(),(c).rend())
#define REV(c) reverse((c).begin(), (c).end())
#define SIZE(a) LL((a).size())

#define FOR(i,a,b) for(LL i=(a);i<(b);++i)
#define ROF(i,a,b) for(LL i=(b-1);i>=(a);--i)
#define REP(i,n) FOR(i,0,n)
#define PER(i,n) ROF(i,0,n)

const double EPS = 1e-10;
const double PI  = acos(-1.0);
const LL LARGE_INT = 1e9+100;
const LL INF = 2e9+100;
const LL INF_LL = (LL)INF*(LL)INF;
const LL MOD = 1e9+7;

//debug
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

LL modpow(LL a, LL n) {
    LL res = 1;
    while (n > 0) {
        if (n & 1) res = res * a % MOD;
        a = a * a % MOD;
        n >>= 1;
    }
    return res;
}

void Main()
{
    LL n,s,d;cin>>n>>s>>d;
    REP(i,n){
        LL x,y;cin>>x>>y;
        if(x<s && y>d){
            cout<<"Yes"<<endl;
            return;
        }
    }
    cout<<"No"<<endl;
    
    
	return;
}

int main()
{
	cin.tie(nullptr);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(15);
	Main();
    return 0;
}
#ifdef GCC_VERSION 
#include<bits/stdc++.h>
#endif

#include <iostream>
#include <set>
#include <vector>
#include <string>
#include <cmath>
#include <map>
#include <tuple>
#include <algorithm>
#include <functional>
#include <deque>
#include <queue>
#include <cstring>
#include <chrono>
#include <numeric>

#ifdef _DEBUG
#define DEBUG_INPUT
#endif

#ifdef DEBUG_INPUT
#include "../__common/Helper.h"
#endif

using ll = long long int;
using ld = long double;

static const ll INF = 6'000'000'000'000'000'000; // -INF for min value

template<typename T> using Vec = std::vector<T>;
template<typename T> using VecVec = std::vector<std::vector<T>>;

#define fe(e,cont) for(auto& e : cont) // others loop types by snippets
#define all(v) std::begin(v),std::end(v)

// only for md-arrays
template<class T> void unsafe_clear(T& val) { auto sz = sizeof(val); std::memset(&val, 0, sz); }
template<class T1, class T2> bool isMemEqual(const T1& v1, const T2& v2) { static_assert(sizeof(v1) == sizeof(v2)); return std::memcmp(&v1, &v2, sizeof(v1)) == 0; }

ll ipow(ll v, ll p) { ll res = 1; while (p--) { res *= v; } return res; }
ll div_ceil(ll a, ll b) { ll res = a / b; if (res * b != a) res++; return res; }

class Timer { // Sometimes measurement is required...
    using sc = std::chrono::steady_clock;  sc::time_point start;
public:
    Timer() :start(sc::now()) {}
    ll elapsedMs() { return std::chrono::duration_cast<std::chrono::milliseconds>(sc::now() - start).count(); }
};

extern const char* INPUT_DATA;

#ifdef DEBUG_INPUT
static Helper helper(INPUT_DATA);
#endif

template<class T>
T __get() {
#ifdef DEBUG_INPUT     
    return helper.get<T>();
#else
    T val; std::cin >> val; return val;
#endif
}

ll get() { return __get<ll>(); }
std::string gets() { return __get<std::string>(); }
std::tuple<ll, ll> get2() { return { get(), get() }; } std::tuple<ll, ll, ll> get3() { return { get(), get(), get() }; } std::tuple<ll, ll, ll, ll>
get4() { return { get(), get(), get(), get() }; } std::tuple<ll, ll, ll, ll, ll> get5() { return { get(), get(), get(), get(), get() }; }

template<class T> void print(const T& val) { std::cout << val << " "; }
template<class T, class ... Types> void print(const T& var, const Types&...var2) { print(var); print(var2...); }
void endl() { std::cout << "\n"; }

void onetime(); void prepare() { std::ios_base::sync_with_stdio(false); std::cin.tie(nullptr);  std::cout.tie(nullptr); onetime(); }
void task(); void tcase() { ll t = get(); while (t--) task(); }



int main() {
    Timer timer; prepare();
    //tcase();
    task();
#ifdef DEBUG_INPUT
    while (helper.hasInput()) task();
    //print("Execution time:", timer.elapsedMs());
#endif
    return 0;
}

//-------------------------------------------------------------

void onetime()
{
}


const char* INPUT_DATA = R"(
4 9 9
5 5
15 5
5 15
15 15

)";



void task()
{
    auto [n, S, D] = get3();
    bool f = false;
    for (ll i = 0; i < n; i += 1)
    {
        ll s = get();
        ll d = get();

        if (s < S && d > D)
        {
            f = true;
        }
    }

    print(f?"Yes":"No");

}

