#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <algorithm>
#include <queue>
#include <stack>
#include<unordered_map>
#include<stdio.h>
#include<deque>
#include<map>
#include<set>
#include<string>
typedef long long LL;
typedef unsigned long long ULL;
typedef long double ld;
using namespace std;
const int MAXN = 1e6 + 500;
const long double eps = (1e-12);
const int logn = 21;
const double Pi = acos(-1.0);
const LL pp = 1e9 + 7;
int lowbit(int x) { return x & (-x); }
#define MP(i,j) make_pair(i,j)
#define M(x) ((((x)%pp)+pp)%pp)
//#define int LL
#define P pair<int,int>
const int INF = 1e9;

int dp[2][105][40005];//前i个，选j个，以20000为准剩余x水、需求y水
int a[105]; int b[105];

signed main() {
	int n; scanf("%d", &n);
	for (int i = 1; i <= n; i++) {
		scanf("%d%d", &a[i], &b[i]);
		a[i] *= 2; b[i] *= 2;
	}
	for (int i = 0; i <= 1; i++) {
		for (int j = 0; j <= n; j++) {
			for (int k = 0; k <= 4 * 100 * n; k++) {
				dp[i][j][k] = -INF;
			}
		}
	}
	dp[0][0][2 * 100 * n] = 0;
	int now = 0;
	for (int i = 0; i <= n; i++) {
		for (int j = 0; j <= n; j++) {
			for (int k = 0; k <= 4 * 100 * n; k++) {
				if (dp[now][j][k] != -INF) {
					if (k > (a[i + 1] - b[i + 1]))
						dp[now ^ 1][j + 1][k - (a[i + 1] - b[i + 1])] = max(dp[now ^ 1][j + 1][k - (a[i + 1] - b[i + 1])], dp[now][j][k] + a[i + 1]);
					dp[now ^ 1][j][k + b[i + 1] / 2] = max(dp[now][j][k], dp[now ^ 1][j][k + b[i + 1] / 2]);
				}
			}
		}
		if (i == n) break;
		for (int j = 0; j <= n; j++) {
			for (int k = 0; k <= 4 * 100 * n; k++) {
				dp[now][j][k] = -INF;
			}
		}
		now ^= 1;
	}
	for (int i = 1; i <= n; i++) {
		int ans = 0;
		for (int k = 0; k <= 4 * 100 * n; k++) {
			if (dp[now][i][k] != -INF) {
				if (k > 2 * 100 * n) ans = max(ans, dp[now][i][k]);
				else {
					ans = max(ans, dp[now][i][k] - (2 * 100 * n - k));
				}
			}
		}
		double anss = 1.0 * ans / 2;
		printf("%.10lf ", anss);
	}
	return 0;
}