#include <bits/stdc++.h>

#define rep(x)for(auto _=0;_<x;_++)
#define all(v)v.begin(),v.end()
using namespace std;
//@formatter:off
struct _nl{}nl;bool _ns=0;template<typename T>void _p(const T&_){if constexpr(is_same<T,_nl>()){cout<<"\n";_ns=0;}
else{if(_ns)cout<<" ";cout<<_;_ns=1;}}template<typename...T>void out(const T&..._){(_p(_),...);}int ii(){int _;cin>>
_;return _;}
//@formatter:on

int arr2d[101][10001];

int main() {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);


    auto n = ii();
    vector<int> cap(n);
    vector<int> amount(n);
    rep(n) {
        cin >> cap[_] >> amount[_];
    }

    for (int i = 0; i <= n; i++) {
        for (int j = 0; j <= n * 100; j++)
            arr2d[i][j] = -1;
    }
    arr2d[0][0] = 0;

    for (int i = 0; i < n; i++) {
        int _c = cap[i];
        int _a = amount[i];
        for (int cnt = i; cnt >= 0; cnt--) {
            for (int j = 0; j <= cnt * 100; j++) {
                if (arr2d[cnt][j] != -1) {
                    int new_c = j + _c;
                    int new_a = arr2d[cnt][j] + _a;
                    if (arr2d[cnt + 1][new_c] < new_a)
                        arr2d[cnt + 1][new_c] = new_a;
                }
            }
        }
    }

    int total_a = accumulate(all(amount), 0);
    for (int i = 1; i <= n; i++) {
        double ans = 0;
        for (int j = 0; j <= i * 100; j++) {
            if (arr2d[i][j] != -1) {
//                out(i, " glasses with cap ", j, " and water ", arr2d[i][j], nl);
                int free_water = total_a - arr2d[i][j];
                ans = max(ans, min((double) j, arr2d[i][j] + 0.5 * free_water));
            }
        }
        out(ans);
    }
    out(nl);


    return 0;
}
