#include <bits/stdc++.h>
using namespace std;
int a[105], b[105];
double dp[2][105][20005];
bool vis[2][105][20005];
int main(){
    int n;
    scanf("%d", &n);

    int x = 0;
    memset(vis, 0, sizeof(vis));
    vis[x][0][0] = 1;

    for(int i=1;i<=n;i++){
        scanf("%d%d", &a[i], &b[i]);

        memset(dp[x^1], 0, sizeof(dp[x^1]));
        memset(vis[x^1], 0, sizeof(vis[x^1]));
        for(int j=0;j<=n;j++){
            for(int k=0;k<=10000;k++){
                if(vis[x][j][k]){
                    dp[x^1][j+1][k+a[i]] = max(dp[x^1][j+1][k+a[i]], dp[x][j][k] + b[i]);
                    vis[x^1][j+1][k+a[i]] = 1;

                    dp[x^1][j][k] = max(dp[x^1][j][k], dp[x][j][k] + b[i]*1.0/2);
                    vis[x^1][j][k] = 1;
                }
            }
        }

        x ^= 1;
    }

    for(int i=1;i<=n;i++){
        double ans = 0;
        for(int j=0;j<=10000;j++){
            if(vis[x][i][j]){
                ans = max(ans, min(j*1.0, dp[x][i][j]));
            }
        }
        printf("%.10lf ", ans);
    }
    printf("\n");
}