#include <bits/stdc++.h>

using namespace std;

int main(){
        vector<int> h;
        vector<string> name;
        string temp;
        int n, f_max = 0, s_max, temp_no;
        
        cin >> n;
        for(int i = 0; i < n; i++){
                cin >> temp >> temp_no;
                name.push_back(temp);
                h.push_back(temp_no);
        }
        
        for(int i = 1; i < n; i++){
                if(h[i] > h[f_max])
                        f_max = i;
        }
        
        if(f_max == 0)
                s_max = 1;
        else
                s_max = 0;
        
        for(int i = 0; i < n; i++){
                if(i != f_max){
                        if(h[i] > h[s_max])
                                s_max = i;
                }
        }
        
        cout << name[s_max];
       
        
        return 0;       
        
}
#include <bits/stdc++.h>
using namespace std;

void solveC() {
	int n;
	cin >> n;
	vector<vector<int>> arr(n, vector<int>(2, 0));
	for (int i = 0; i < n; i++) cin >> arr[i][0] >> arr[i][1];

	for (int i = 0; i < n; i++) {
		for (int j = i + 1; j < n; j++) {
			for (int k = j + 1; k < n; k++) {
				int x1 = arr[j][0] - arr[i][0], y1 = arr[j][1] - arr[i][1];
				int x2 = arr[k][0] - arr[j][0], y2 = arr[k][1] - arr[j][1];
				if (y2 * x1 == x2 * y1) {
					cout << "Yes" << "\n";
					return ;
				}
			}
		}
	}

	cout << "No" << "\n";
}

void code() {
#ifndef ONLINE_JUDGE
	freopen("input.txt", "r", stdin);
	freopen("output.txt", "w", stdout);
#endif
}

int main() {
	// code();

	solveC();
}