#include <bits/stdc++.h>

using namespace std;

int main()
{
    int n;
    cin >> n;
    vector<double> plate(n);
    vector<double> procenti(n);
    for(int i = 0; i < n; i++){
        cin >> plate[i] >> procenti[i];
    }

    double maksPare = -1;
    for(int i = 0; i < n; i++){
        double pare = 0.0;
        for(int j = 0; j < n; j++){
            if(procenti[j] >= procenti[i]){
                cout << (plate[j] * procenti[i] / 100) << " ";
                pare += (plate[j] * procenti[i] / 100);
            }
        }
        if(pare > maksPare)
            maksPare = pare;
    }
    cout << maksPare;
}