using System;

namespace kv2_z2
{
    class Program
    {

        static void swap(ref fl x, ref fl y)
        {
            fl p = x;
            x = y;
            y = p;
        }
        static long podela(fl[] a, long l, long r)
        { 
            long k = l;
            for (long i = l + 1; i <= r; i++)
            {
                if (a[i].p < a[l].p) swap(ref a[++k], ref a[i]);
            }
            swap(ref a[k], ref a[l]);
            return k;
        }
        static void quickSort(fl[] a, long l, long r)
        {
            if (l < r)
            {
                long k = podela(a, l, r);
                quickSort(a, l, k - 1);
                quickSort(a, k + 1, r);
            }
        }
        static void sort(fl[] a)
        {
            quickSort(a, 0, a.Length - 1);
        }
        static double izracunajz(fl[] a, long x, long y)
        {
            double uz = 0;
            for(long i = x; i < y; i++)
            {
                uz += a[i].a * a[x].p / 100;
            }
            return uz;
        }
        struct fl
        {
            public long a;
            public double p;
        }
        static void Main(string[] args)
        {
            long n = long.Parse(Console.ReadLine());
            fl[] fl = new fl[n];
            for (long i = 0; i < n; i++)
            {
                string[] s = Console.ReadLine().Split();
                fl[i].a = long.Parse(s[0]);
                fl[i].p = double.Parse(s[1]);
            }
            quickSort(fl, 0, n - 1);
            for (int i = 0; i < n; i++) Console.WriteLine(fl[i].a + " " + fl[i].p);
            double maxz = 0;
            for(long i = 0; i < n; i++)
            {
                double uz = izracunajz(fl, i, n);
                if(uz > maxz) maxz = uz;
            }
            Console.WriteLine(maxz);
        }
    }
}