#include<iostream>
#include<sstream>
#include<algorithm>
#include<array>
#include<vector>
#include<numeric>
#include<bits/stdc++.h>
using namespace std;

int main()
{

    float broj_frilensera,profit,i,zbir,y;
    float a,b,c,x;
    std::vector<double> porezi;
    std::vector<int> plate;
    std::vector<double>profiti;
    cin>>broj_frilensera;
    a = 0;
    while(a<broj_frilensera){
        cin>>b;
        plate.push_back(b);
        cin>>b;
        porezi.push_back(b);
        a++;
    }
    sort(porezi.begin(),porezi.end());
    sort(plate.begin(),plate.end());
    y = 0;
    for(porezi[x];x <= broj_frilensera;x++) {
        while(porezi[x]>=porezi[y]){
        y++;
        }
        zbir = accumulate(plate[x],plate.end())*porezi[x]/100;
        profiti.push_back(zbir);
    }
    cout<<max_element(profiti.begin(),profiti.end());



    return 0;
}