#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define debug(x) cerr<<#x<<" = "<<x
#define sp <<"  "
#define el <<endl
#define fgx cerr<<" ---------------------- "<<endl
#define uint unsigned int
#define ULL unsigned long long
#define DB double
#define LDB long double
#define pii pair<int,int>
#define mpt make_pair
#define pb push_back
#define fr first
#define sc second
inline LL read(){
	LL nm=0; bool fh=true; char cw=getchar();
	for(;!isdigit(cw);cw=getchar()) fh^=(cw=='-');
	for(;isdigit(cw);cw=getchar()) nm=nm*10+(cw-'0');
	return fh?nm:-nm;
}
#define M 102
#define MAXN 10000
int n,b[M],a[M],F[M][M][M*M],all;
inline void chkmx(int &x,int y){x=(x>y)?x:y;}

int main(){
	n=read();
	for(int i=1;i<=n;i++) b[i]=read(),a[i]=read(),all+=a[i];
	memset(F,-0x3f,sizeof(F)),F[0][0][0]=0;
	for(int i=0;i<n;i++) for(int j=0;j<=n;j++) for(int k=0;k<=MAXN;k++)
		if(F[i][j][k]>=0) chkmx(F[i+1][j+1][k+a[i+1]],F[i][j][k]+b[i+1]-a[i+1]),chkmx(F[i+1][j][k],F[i][j][k]);
	for(int i=1;i<=n;i++){
		DB ans=0.0;
		for(int j=0;j<=MAXN;j++){
			int Rest=F[n][i][j]; DB rem=j+min((DB)Rest,(DB)(all-j)/2.0);
			ans=max(ans,rem);
		}
		printf("%.12lf",ans),putchar(i==n?'\n':' ');
	}
	return 0;
}
