#include <cstdio>
#include <cstring>
#include <algorithm>
#define cle(x) memset(x,0,sizeof(x))
using namespace std;
const int N=102,INF=1<<30;
int f[2][N][10003],a[N],b[N];
int n,m,bs,as;
double ans[N];
void f1(){
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d%d",&a[i],&b[i]);
		bs+=b[i];as+=a[i];
	}
	for(int i=0;i<=1;i++){
		for(int k=0;k<=n;k++){
			for(int j=1;j<=as;j++)f[i][k][j]=-INF;
		}
	}
	f[0][0][0]=0;
	for(int i=1;i<=n;i++){
		int t=i&1;
		for(int k=0;k<=n;k++){
			for(int j=0;j<=as;j++)f[t][k][j]=f[t^1][k][j];
		}
		for(int k=1;k<=i;k++){
			for(int j=a[i];j<=as;j++){
					f[t][k][j]=max(f[t][k][j],f[t^1][k-1][j-a[i]]+b[i]);
				
			}
		}
	}
	int t=n&1;
	for(int k=1;k<=n;k++){
		for(int i=1;i<=as;i++){
			ans[k]=max<double>(ans[k],min<double>(i,f[t][k][i]/2.0+bs/2.0));}
		printf("%.10lf ",ans[k]);
	}
}
int main(){
	f1();
	return 0;
} 