#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    float py,porez=0.01,prz,temp;
    double m=0,u=0;
    int ay;
    int a[200000] ={0};
    float p[200000] ={0};
    cin>>n;
    for(int i=0; i<n; i++)
        cin>>a[i]>>p[i];
    while(porez<100){
        for(int y=0; y<n; y++){
            py=p[y];
            ay=a[y];
            if(porez<=py){
                u=u+ay;
            }
        }
        porez=porez*100;
        porez=round(porez);
        porez=porez/100;
        u=(u/100)*porez;
        if(u>m){
            m=u;
        }
        u=0;
        porez+=0.01;
    }
    printf("%0.4lf",m);
}