#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repi(i, n) for (int i = 0; i < (int)(n);)
#define rep0(i, n) for (int i = 0; i <= (int)(n); i++)
#define rep1(i, n) for (int i = 1; i <= (int)(n); i++)

using namespace std;

int main(void) {
  int N;
  cin >> N;
  int A;
  cin >> A;
  int B;
  cin >> B;

  cout << N - A + B << endl;
}
#include <bits/stdc++.h>
typedef long long ll;
typedef long double ld;
#define fr(i, a, b) for (ll i = a; i < b; i++)
#define rf(i, a, b) for (ll i = a; i >= b; i--)
typedef std::vector<long long> vi;
#define F first
#define S second
#define fast                      \
    ios_base::sync_with_stdio(0); \
    cin.tie(0);                   \
    cout.tie(0);
#define mod 1000000007
#define PB push_back
#define MP make_pair
#define PI 3.14159265358979323846
#define all(a) a.begin(), a.end()
#define mx(a) *max_element(all(a))
#define mn(a) *min_element(all(a))
const ll INF = LLONG_MAX / 2;
const ll N = 2e5 + 1;
using namespace std;
int main()
{
    fast;
    ll t = 1;
    // std::cin >> t;
    while (t--)
    {
        ll n, i, j = 0, s, d;
        std::cin >> n >> s >> d;
        fr(i, 0, n)
        {
            ll x, y;
            cin >> x >> y;
            if (x < s && y > d)
                j = 1;
        }
        if (j == 1)
            cout << "Yes\n";
        else
        {
            cout << "No\n";
        }
    }
}