#include<bits/stdc++.h>
#include <iomanip>
using namespace std;
bool sortiranjepodrugomclanu(const pair<int,double> &prvi,
               const pair<int,double> &drugi)
{
    return (prvi.second > drugi.second);
}
const double k=100;
int main()
{
    int n;
    cin>>n;
    vector< pair <int,double>> a;
    double maximalna,ans;
    for (int i=0; i<n; i++)
    {
        int pomocna1;
        double pomocna2;
        cin>>pomocna1>>pomocna2;
        a.push_back(make_pair(pomocna1,pomocna2));
    }
    sort(a.begin(),a.end(),sortiranjepodrugomclanu);
    maximalna = a[0].first;
    ans = maximalna*a[0].second/k;
    for (int i=1; i<n; i++)
    {
        maximalna+=a[i].first;
        if ((maximalna-a[i].first)*a[i-1].second/k < maximalna*a[i].second/k)
            ans=maximalna*a[i].second/k;
    }
    cout<<fixed;
    cout<<setprecision(5)<<ans;
    return 0;
}