#include <bits/stdc++.h>
using namespace std;

int main() 	{
	int N;
	vector< pair<double, long> > vect;
	long A; double P;
	long sum = 0; double percent = 0, result = 0;
	
	cin>>N;
	
	for(int i=0; i<N; i++) {
		cin>>A;
		cin>>P;
		vect.push_back(make_pair(P, A));
	}
	
	sort(vect.rbegin(), vect.rend());
	
	percent = vect[0].first;
	sum=vect[0].second; result=sum*percent/100;
	for(int i=1; i<N; i++) {
		A = vect[i].second;
		P = vect[i].first;
		sum+=A;
		if(sum*P/100>result){
			result = sum*P/100;
			percent=P;
		}
	}
	
	cout<<percent;
	return 0;
}