#include <bits/stdc++.h>
using namespace std;
const int N = 101, NN = N * N;

int n, a[N], b[N], sumB = 0;
int dp[N][N][NN];

int main() {
  ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    cin >> a[i] >> b[i];
    sumB += b[i];
  }

  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      for (int k = 0; k < NN; ++k) {
        dp[i][j][k] = -1e9;
      }
    }
  }

  dp[0][0][0] = 0;
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= i; ++j) {
      for (int k = 0; k < NN; ++k) {
        dp[i][j][k] = dp[i - 1][j][k];
        if (k >= b[i] && j > 0) {
          dp[i][j][k] = max(dp[i][j][k], dp[i - 1][j - 1][k - b[i]] + a[i]);
        }
      }
    }
  }

  for (int k = 1; k <= n; ++k) {
    double ans = 0;
    for (int B = 0; B < NN; ++B) {
      if (B <= dp[n][k][B]) {
        ans = max(ans, (double)B + min((double)(dp[n][k][B] - B), (double)(sumB - B) / 2.0));
      }
    }
    cout << fixed << setprecision(10) << ans << "\n";
  }

  return 0;
}