#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int Maxn=100;
int n;
int a[Maxn+5],b[Maxn+5];
int f[2][Maxn+5][Maxn*Maxn<<1|5];
int main(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d%d",&a[i],&b[i]);
		a[i]<<=1;
		b[i]<<=1;
	}
	int sum=0;
	memset(f[0],0x9f,sizeof f[0]);
	f[0][0][0]=0;
	for(int i=1;i<=n;i++){
		int last=((i-1)&1),cur=(i&1);
		memset(f[cur],0x9f,sizeof f[cur]);
		sum+=a[i];
		for(int j=0;j<=i;j++){
			for(int k=0;k<=sum;k++){
				f[cur][j][k]=max(f[cur][j][k],f[last][j][k]+(b[i]>>1));
				if(j>0&&k>=a[i]){
					f[cur][j][k]=max(f[cur][j][k],f[last][j-1][k-a[i]]+b[i]);
				}
			}
		}
	}
	int cur=(n&1);
	for(int i=1;i<=n;i++){
		int ans=0;
		for(int k=0;k<=sum;k++){
			ans=max(ans,min(k,f[cur][i][k]));
		}
		printf("%.9lf ",(ans/2.0));
	}
	puts("");
	return 0;
}
