using System;

namespace ConsoleApp1
{
    class Program
    {
        public static void BubbleSort(double[] input, double[] a, int n)
        {
            var itemMoved = false;
            do
            {
                itemMoved = false;
                for (int i = 0; i < n - 1; i++)
                {
                    if (input[i] > input[i + 1])
                    {
                        var lowerValue = input[i + 1];
                        input[i + 1] = input[i];
                        input[i] = lowerValue;
                        lowerValue = a[i + 1];
                        a[i + 1] = a[i];
                        a[i] = lowerValue;
                        itemMoved = true;
                    }
                }
            } while (itemMoved);
        }

        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            double[] a = new double[n];
            double[] p = new double[n];
            int i = 0;
            while (i<n)
            {
                string[] x = Console.ReadLine().Split();
                a[i] = double.Parse(x[0]);
                p[i] = double.Parse(x[1]);
                ++i;
            }
            BubbleSort(p, a, n);
            i = 0;
            int j = 0;
            double z = 0;
            double max = 0;
            while (i < n)
            {
                while(j < n)
                {                                  
                    z += p[i] * a[j] / 10000;
                    j++;
                }
                if(max<z)
                {
                    max = z;
                }
                z = 0;
                j = i;
                i++; 
            }
            Console.WriteLine("" + max);
        }
    }
}