#include <bits/stdc++.h>
#define int long long
// #include <atcoder/all>
// using namespace atcoder;
// using mint = modint1000000007;
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
constexpr int MOD = 1000000007;
constexpr int INF = numeric_limits<int>::max() / 2;
typedef pair<int,int> P;
using Graph = vector<vector<int>>;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }
const long double PI = acos(-1.0);
// cout << fixed << setprecision(14);

signed 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 && Y[i] > D){
            cout << "Yes" << endl;
            return 0;
        } 
    }
    cout << "No" << endl;
}
#include<iostream>
using namespace std;
int main()
{
    int a, b, c;
    int ans;
    cin >> a >> b >> c;

    if (a == b) {
        ans = c;
    } else {
        if (b == c) {
            ans = a;
        } else {
            if (c == a) {
                ans = b;
            } else {
                ans = 0;
            }
        }
    }
    cout << ans << endl;

    return 0;
}