#include <bits/stdc++.h>
//#include <immintrin.h>
//#pragma GCC optimize("O3")
//#pragma GCC target("sse,sse2,ssse3,sse4,popcnt,abm,mmx,avx,avx2,tune=native")
using namespace std;

#define PI 3.141592653589
#define endl "\n"
// #define int long long
#define ld double
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define sz(x) (int)(x.size())
#define fr(i,a,b) for(int i = (a); i < (b); ++i)

#define vi vector<int>
#define vpi vector<pair<int, int>>

int is[105][10010][105];

const int N = 110;
int a[N], b[N], c[N], res[N];

void solve(){
	int n;
	cin >> n;
	int B = 0;
	fr(i, 0, n){
		cin >> a[i] >> b[i];
		c[i] = 2 * a[i] - b[i];
		B += b[i];
		res[i + 1] = 0;
	}
	// B *= 2;
	
	fr(i, 0, n + 1){
		fr(m, 0, 10010){
			fr(j, 0, n + 1){
				is[i][m][j] = -1;
			}
		}
	}

	is[0][0][0] = 0;
	
	fr(i, 0, n){
		fr(m, 0, 10010){
			fr(j, 0, n){
				if(is[i][m][j] == -1) continue;
				is[i + 1][m][j] = max(is[i + 1][m][j], is[i][m][j]);
				int nx = min(B, m + c[i]);
				is[i + 1][nx][j + 1] = max(is[i + 1][nx][j + 1], is[i][m][j] + b[i]);
				// cout << i << ' ' << nx << ' ' << j << ' ' << m << ' ' << is[i + 1][nx][j + 1] << endl;
			}
		}
	}
	fr(m, 0, 10010){
		fr(j, 1, n + 1){
			if(is[n][m][j] == -1) continue;
			res[j] = max(res[j], is[n][m][j] + m);
		}
	}
	fr(i, 1, n + 1) cout << fixed << setprecision(12) << res[i] / 2.0<< ' ';
}

signed main() {
	#ifndef ONLINE_JUDGE
		freopen("input.txt", "r", stdin);
		freopen("output.txt", "w", stdout);
	#endif
    ios::sync_with_stdio(0); cin.tie(0);
    int t;
    t = 1;
    //cin >> t;
    while(t--) {solve();}
    return 0;
}
