#include <iostream>

int main()
{
        int n;
        double srvr=0;
        double finporez;
        double finzar=0;
        std::cin >> n;
        int zarada[n];
        double maxporez[n];
        double vrednost[n];
        for(int i=0;i<n;i++)
        {
                std::cin >> zarada[i] >> maxporez[i];
                vrednost[i] = (double)(zarada[i]*maxporez[i]/100);
                srvr+=vrednost[i];
        }
        srvr = (double)srvr/n;
        for(int i=0;i<n;i++)
        {
                if(vrednost[i]>srvr)
                {
                        finzar += zarada[i];
                        if(i==0)
                                finporez = maxporez[i];
                        if(maxporez[i]<finporez)
                                finporez = maxporez[i];

                }
        }
        finporez = (double)finporez/100;
        double zaradadrzave=finporez*(double)finzar;
        printf("%f", (double)finzar*(double)finporez);


}