#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define pb push_back
#define ub upper_bound
#define lb lower_bound
#define endl "\n"
#define mod 1000000007
#define rep(i, n) for (int i = 0; i < n; i++)
#define repr(i, n) for (int i = n - 1; i >= 0; i--)

void solve()
{
    int n;
    cin >> n;
    vector<vector<ll>> ncr(205, vector<ll>(15));
    ncr[0][0] = 1;
    for (int i = 1; i <= 200; i++)
    {
        ncr[i][0] = 1;
        for (int j = 1; j <= min(12, i); j++)
        {
            ncr[i][j] = ncr[i - 1][j] + ncr[i - 1][j - 1];
        }
    }
    cout << ncr[n - 1][11];
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    solve();

    return 0;
}
#include <stdio.h>

int N, Ans;
int d[1500][2];

int main() {
	int i, u, Max;

	scanf("%d", &N);
	for (i = 0; i < N; i++) scanf("%d%d", &d[i][0], &d[i][1]);

	Ans = d[0][0] + d[0][1];
	for (i = 0; i < N; i++) Ans = ((Ans < d[i][0] + d[i][1]) ? Ans : d[i][0] + d[i][1]);
	for (i = 0; i < N; i++) for (u = 0; u < N; u++) if (i - u) Max = ((d[i][0] > d[u][1]) ? d[i][0] : d[u][1]), Ans = ((Ans < Max) ? Ans : Max);

	printf("%d", Ans);

	return 0;
}
