#include <bits/stdc++.h>

using namespace std;

int main(){
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	map<double,double> fl;
	int n;
	cin>>n;
	for(int i =0;i<n;i++){
		double a,p;
		cin>>a>>p;
		fl.insert(pair<double,double>(p,a));
	}
	double ps[n];
	ps[0] = fl.begin()->second;
	map<double,double>::iterator it;
	int i =1;
	for(it = ++fl.begin(); it !=fl.end(); ++it){
		ps[i] = ps[i-1] + it->second;
	
		i++;
	
	
	}
	double cur=0;
	double maxx =(ps[n-1])*(fl.begin()->first)/100;
	double prevP = fl.begin()->first;
	i=1;
	for(it = ++fl.begin(); it !=fl.end(); ++it){
		cur  = (ps[n-1]-ps[i-1])*(it->first)/100;
		cout<<fixed<<cur<<' '<<it->first<<' '<<ps[n-1]-ps[i-1]<<endl;
		maxx = max(cur,maxx);
		prevP = it->first;
		i++; 
	}
	cout<<fixed<<maxx;
	return 0;
}