#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define xx first
#define yy second
#define all(v) (v).begin(), (v).end()

/*
 * 고른 집합 = x, 안 고른 집합 = y
 * sum(x_b) + min( sum(x_a) - sum(x_b), sum(y_b)/2 )
 * min( sum(x_a) , sum(x_b) + sum(y_b)/2 )
 */

int n, a[105], b[105];
int dp[105][105*105];
//dp[i][j] : x의 크기가 i이고, sum(x_a)가 j일 때 => 2*sum(x_b) + sum(y_b) 의 최대값.
int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    cin >> n;
    for(int i=0; i<n; ++i)
        cin >> a[i] >> b[i];
    fill(&dp[0][0], &dp[105][0], -987654321);
    dp[0][0] = 0;

    for(int k=0; k<n; ++k){
        //k번째 컵을 x에? y에?
        for(int i=n; i>=0; --i){
            for(int j=0; j<=100*100; ++j){
                //y에
                //dp[i][j] = max(dp[i][j], dp[i][j] + b[k]);
                dp[i][j] += b[k];
                //x에
                if(i > 0 && j-a[k] >= 0)
                    dp[i][j] = max(dp[i][j], dp[i-1][j-a[k]] + 2*b[k]);
            }
        }

//        cout << "k = " << k << endl;
//        for(int i=0; i<=n; ++i){
//            for(int j=0; j<=30; ++j){
//                cout << max(-1, dp[i][j]) << ' ';
//            }
//            cout << endl;
//        }
    }

    for(int i=1; i<=n; ++i){
        int ans = 0;
        for(int j=0; j<=100*100; ++j) {
            if (dp[i][j] >= 0) {
//                cout << i << ' ' << j << " : " << dp[i][j] << endl;
                ans = max(ans, min(2 * j, dp[i][j]));
            }
        }
        cout << ans/2;
        if(ans%2) cout << ".5\n";
        else cout << ".0\n";
    }


}