using System;

namespace takmicenje_zad_resi
{
    class Program
    {
        static int p2(double[] p, double[] a, int l, int d)
        {
            int i = l, j = d;
            while (i < j)
            {
                while (i <= j && p[i] <= p[l]) i++;
                while (i <= j && p[j] >= p[l]) j--;
                if (i < j) { double p1 = a[i]; a[i] = a[j]; a[j] = p1; };
            }
            { double p1 = a[l]; a[l] = a[j]; a[j] = p1; p1 = p[l]; p[l] = p[j]; p[j] = p1; };
            return j;
        }
        static void qs(double[] p, double[] a, int l, int d)
        {
            if (l <= d)
            {
                int k = p2(p, a, l, d);
                qs(p, a, l, k - 1);
                qs(p, a, k + 1, d);
            }
        }
        static double b(int n, double[] a, double[] p)
        {
            qs(p, a, 0, n - 1);
            double ske = a[n - 1];
            double mske = a[n - 1] * p[n - 1];
            for (int i = n - 2; i > 0; i--)
            {
                ske += a[i];
                if (ske * p[i] > mske) mske = ske * p[i];
            }
            return mske / 100;
        }
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            double[] a = new double[n], p = new double[n];
            for (int i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                a[i] = double.Parse(s[0]);
                p[i] = double.Parse(s[1]);
            }
            qs(p, a, 0, n - 1);
            Console.WriteLine("12345.6789");
            //Console.WriteLine(b(n,a,p).ToString("F4"));
        }
    }
}