#include<bits/stdc++.h>
#define IOS ios::sync_with_stdio(false);cin.tie(0), cout.tie(0);
#define casei int _;for(cin >> _; _; --_)
#define mp make_pair
#define fi first
#define se second
using namespace std;
using ll = long long;
using pii = pair<int, int>;
const ll mod = 998244353;
const int N = 1e2 + 5;
int dp[N][N][10005];
int a[N], b[N], ans[N];
int main(){
    IOS;
    int n, CAP = 0;
    cin >> n;
    for(int i = 1; i <= n; ++i){
        cin >> a[i] >> b[i];
    }
    memset(dp, 0xf0, sizeof(dp));
    dp[0][0][0] = 0;
    for(int i = 1; i <= n; ++i){
        CAP += a[i];
        for(int k = 0; k <= n; ++k){
            for(int j = 0; j <= CAP; ++j){
                int &now = dp[i][k][j];
                now = dp[i-1][k][j] + b[i];
                if(k && j - a[i] >= 0)now = max(now, dp[i-1][k-1][j-a[i]] + 2 * b[i]);
                if(ans[k] < min(now, 2 * j))ans[k] = min(now, 2 * j);
            }
        }
    }
    for(int k = 1; k <= n; ++k){
        cout << fixed << setprecision(6) << ans[k] / 2.0 << " ";
    }
    cout << endl;
}
