#include <iostream>
using namespace std;
int index(long double* array, int size)
{
    double max = array[0];
    int maxpos = 0;

    int i;
    for (i = 1; i < size; i++)
    {
        if (max < array[i])
        {
            max = array[i];
            maxpos = i;
        }
    }

    return maxpos;
}
int main()
{
    int N;
    long double A[10000];
    long double zbir[10000] = {0};
    long double P[10000];
    cin >> N;
    for (int i = 0; i < N; i++)
    {
        cin >> A[i] >> P[i];
    }
    for (int i = 0; i < N; i++)
    {
        for (int k = 0; k < N; k++)
        {
            if (P[i] <= P[k])
            {
                zbir[i] += (A[k] / 100 * P[i]);
                
            }
        }
    }
    cout << P[index(zbir, 2000)];

}