100
1 0
1 0
1 0
1 0
1 0
1 1
1 0
1 0
1 0
1 1
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 1
1 0
1 0
1 0
1 0
1 1
1 0
1 1
1 0
1 1
1 1
1 0
1 0
1 0
1 1
1 0
1 0
1 0
1 1
1 1
1 0
1 1
1 0
1 1
1 1
1 0
1 0
1 0
1 0
1 1
1 0
1 0
1 0
1 0
1 1
1 0
1 0
1 1
1 0
1 0
1 0
1 1
1 0
1 1
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 1
1 0
1 1
1 0
1 0
1 1
1 1
1 0
1 0
1 1
1 0
1 0
1 1
1 1
1 1
1 0
1 0
1 1
1 0
1 0
1 1
1 0
1 0
1 0
1 0
1 0
 50
60 10
95 12
98 84
38 16
82 32
67 51
86 18
99 31
86 51
83 48
78 37
81 18
97 12
95 18
92 43
92 61
90 75
76 13
60 6
62 42
90 26
41 35
82 39
33 19
100 99
43 10
74 67
95 86
15 6
20 2
76 20
86 10
92 54
99 38
85 83
70 48
77 68
95 42
38 33
74 17
9 6
90 64
66 59
88 37
38 10
100 76
44 36
68 12
48 4
83 25
 10
1 1
1 0
1 0
1 1
1 0
1 1
1 0
1 1
1 0
1 1
 2
56 42
53 28
 3
1 1
1 0
1 0
 10
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
1 0
 20
13 12
64 18
72 50
69 69
79 21
68 45
99 29
74 47
18 16
57 19
14 10
75 67
39 38
64 0
53 35
84 76
76 59
78 21
7 1
85 43
 1
86 76

1.0000000000 2.0000000000 3.0000000000 4.0000000000 5.0000000000 6.0000000000 7.0000000000 8.0000000000 9.0000000000 10.0000000000 11.0000000000 12.0000000000 13.0000000000 14.0000000000 15.0000000000 16.0000000000 17.0000000000 18.0000000000 19.0000000000 20.0000000000 21.0000000000 22.0000000000 23.0000000000 24.0000000000 25.0000000000 26.0000000000 27.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28.0000000000 28... 100.0000000000 200.0000000000 299.0000000000 398.0000000000 496.0000000000 593.0000000000 688.0000000000 783.0000000000 878.0000000000 973.0000000000 1065.0000000000 1157.0000000000 1247.0000000000 1324.0000000000 1382.0000000000 1429.5000000000 1460.5000000000 1484.0000000000 1505.0000000000 1524.5000000000 1543.5000000000 1562.0000000000 1580.5000000000 1598.5000000000 1616.0000000000 1632.5000000000 1648.5000000000 1664.0000000000 1677.0000000000 1689.5000000000 1699.5000000000 1709.0000000000 1718.0000... 1.0000000000 2.0000000000 3.0000000000 4.0000000000 5.0000000000 5.0000000000 5.0000000000 5.0000000000 5.0000000000 5.0000000000
 56.0000000000 70.0000000000
 1.0000000000 1.0000000000 1.0000000000
 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000 0.0000000000
 99.0000000000 184.0000000000 268.0000000000 347.0000000000 425.0000000000 493.0000000000 536.5000000000 566.0000000000 585.0000000000 602.5000000000 617.0000000000 627.5000000000 638.0000000000 647.5000000000 656.5000000000 664.5000000000 670.5000000000 675.5000000000 676.0000000000 676.0000000000
 76.0000000000

#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;
}
