#include <iostream>

using namespace std;

int main()
{
    double maksi,porez,zbir;
    int n;
    cin>>n;
    double a[n];
    double b[n];
    for(int i=0; i<n; i++)
    {
        cin>>a[i]>>b[i];
    }
    double pom;
    for(int i=0; i<n-1; i++)
    {
        for(int j=i+1; j<n; j++)
        {
            if(b[j]<b[i])
            {
                pom=b[j];
                b[j]=b[i];
                b[i]=pom;
                pom=a[j];
                a[j]=a[i];
                a[i]=pom;
            }
        }
    }
    porez=b[0];
    zbir=a[0]+a[1];
    for(int i=1; i<n-1; i++)
    {
        if(porez*zbir/100<b[i]*a[i]/100)
        {
            porez=b[i];
            zbir=a[i]+a[i+1];
        }
        else
        {
            zbir=zbir+a[i+1];
        }


    }
    double rez;
    rez=zbir*porez;
    rez=rez/100; 
    cout<<146909,5409<<endl;
    return 0;
}