#include <iostream>
#include <vector>
#include <algorithm>

using namespace::std;

int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);
	double ai, pi, sum = 0;
	int n;
	cin >> n;
	vector<pair<double, double>> a;
	for (int i = 0; i < n; i++) {
		cin >> ai >> pi;
		sum += ai;
		a.push_back(make_pair(pi, ai));
	}
	double pom;
	sort(a.begin(), a.end());
	for (auto i : a) {
		//i.first /= 100;
		pom = sum * i.first / 100;
		cout << fixed << pom << endl;
		sum -= i.second;
	}
	return 0;
}