#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define all(x) x.begin(),x.end()
#define pii pair<int,int>
#define en '\n'
using namespace std;
const ll mod=998244353;
const int maxn = 1e2 + 2;
const int inf = 1e9+7;
const ll linf = 4e18;
int dp[maxn][maxn][maxn*maxn];
void solve()
{
    int n;
    cin>>n;
    vector<int>a(n+1),b(n+1);
    int sa=0,sb=0;
    for(int i=1;i<=n;i++)cin>>a[i]>>b[i],sb+=b[i];
    memset(dp,-1,sizeof(dp));
    dp[0][0][0]=0;
    for(int i=1;i<=n;i++){
        sa+=a[i];
        for(int j=0;j<=i;j++){
            for(int k=0;k<=sa;k++){
                dp[i][j][k]=dp[i-1][j][k];
                if(j>0&&k>=a[i]&&~dp[i-1][j-1][k-a[i]])
                    dp[i][j][k]=max(dp[i][j][k],dp[i-1][j-1][k-a[i]]+b[i]);
            }
        }
    }
    for(int i=1;i<=n;i++){
        double ans = 0;
        for(int j=0;j<=sa;j++){
            if(dp[n][i][j]==-1)continue;
            double ko=sb+dp[n][i][j];
            ko/=2;
            ans=max(ans,min(ko,(double)j));
        }
        cout<<fixed<<showpoint<<setprecision(9)<<ans<<' ';
    }
}
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);
    cerr.tie(0);
    int tt = 1;
    //cin >> tt;
    while (tt--)
        solve();
    return 0;
}
