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

import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.stream.IntStream;
import java.util.Arrays;
import java.util.OptionalInt;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.NoSuchElementException;
import java.io.OutputStream;
import java.nio.CharBuffer;
import java.io.IOException;
import java.nio.charset.CharsetDecoder;
import java.nio.charset.StandardCharsets;
import java.io.UncheckedIOException;
import java.util.stream.Stream;
import java.io.Writer;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author mikit
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        LightScanner2 in = new LightScanner2(inputStream);
        LightWriter2 out = new LightWriter2(outputStream);
        BGlassHalfSpilled solver = new BGlassHalfSpilled();
        solver.solve(1, in, out);
        out.close();
    }

    static class BGlassHalfSpilled {
        private static final int INF = 1_000_000_000;

        public void solve(int testNumber, LightScanner2 in, LightWriter2 out) {
            int n = in.ints();
            int[] a = new int[n], b = new int[n];
            in.ints(a, b);

            int asum = 0, bsum = 0;
            for (int x : a) asum += x;
            for (int x : b) bsum += x;

            int[][][] dp = new int[n + 1][n + 1][asum + 1];
            ArrayUtil.fill(dp, -INF);
            dp[0][0][0] = 0;
            for (int i = 0; i < n; i++) {
                for (int k = 0; k <= n; k++) {
                    System.arraycopy(dp[i][k], 0, dp[i + 1][k], 0, asum + 1);
                }
                for (int j = a[i]; j <= asum; j++) {
                    for (int k = 1; k <= n; k++) {
                        dp[i + 1][k][j] = Math.max(dp[i + 1][k][j], dp[i][k - 1][j - a[i]] + b[i]);
                    }
                }
            }


            for (int i = 1; i <= n; i++) {
                double ans = 0.0;
                for (int j = 0; j <= asum; j++) {
                    double max = -INF;
                    for (int k = 0; k <= i; k++) {
                        max = Math.max(max, dp[n][k][j]);
                    }
                    //System.out.println("i="+i+", j="+j+", max="+max);
                    double loss = bsum - max;
                    ans = Math.max(ans, Math.min(j, max + loss * 0.5));
                }
                out.ans(ans, 10);
            }
            out.ln();
        }

    }

    static class LightWriter2 implements AutoCloseable {
        private static final int BUF_SIZE = 16 * 1024;
        private final OutputStream out;
        private final byte[] buf = new byte[BUF_SIZE];
        private int ptr;
        private boolean autoflush = false;
        private boolean breaked = true;

        public LightWriter2(OutputStream out) {
            this.out = out;
        }

        public LightWriter2(Writer out) {
            this.out = new LightWriter2.WriterOutputStream(out);
        }

        private void allocate(int n) {
            if (ptr + n <= BUF_SIZE) return;
            try {
                out.write(buf, 0, ptr);
                ptr = 0;
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
            if (BUF_SIZE < n) throw new IllegalArgumentException("Internal buffer exceeded");
        }

        public void close() {
            try {
                out.write(buf, 0, ptr);
                ptr = 0;
                out.flush();
                out.close();
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

        public LightWriter2 ans(double x, int n) {
            allocate(n + 24);
            if (!breaked) buf[ptr++] = ' ';
            breaked = false;

            if (x < 0) {
                buf[ptr++] = '-';
                x = -x;
            }
            x += Math.pow(10, -n) / 2; //rounding

            long l = (long) x;
            x -= l;
            int w = countDigits(l);
            for (int i = ptr + w - 1; ptr <= i; i--) {
                buf[i] = (byte) (l % 10 + '0');
                l /= 10;
            }
            ptr += w;

            buf[ptr++] = '.';
            for (int i = 0; i < n; i++) {
                x *= 10.0;
                buf[ptr++] = (byte) ('0' + ((int) x));
                x -= (int) x;
            }
            return this;
        }

        private static int countDigits(long l) {
            if (l >= 1000000000000000000L) return 19;
            if (l >= 100000000000000000L) return 18;
            if (l >= 10000000000000000L) return 17;
            if (l >= 1000000000000000L) return 16;
            if (l >= 100000000000000L) return 15;
            if (l >= 10000000000000L) return 14;
            if (l >= 1000000000000L) return 13;
            if (l >= 100000000000L) return 12;
            if (l >= 10000000000L) return 11;
            if (l >= 1000000000L) return 10;
            if (l >= 100000000L) return 9;
            if (l >= 10000000L) return 8;
            if (l >= 1000000L) return 7;
            if (l >= 100000L) return 6;
            if (l >= 10000L) return 5;
            if (l >= 1000L) return 4;
            if (l >= 100L) return 3;
            if (l >= 10L) return 2;
            return 1;
        }

        public LightWriter2 ln() {
            allocate(1);
            buf[ptr++] = '\n';
            breaked = true;
            if (autoflush) {
                try {
                    out.flush();
                } catch (IOException ex) {
                    throw new UncheckedIOException(ex);
                }
            }
            return this;
        }

        private static class WriterOutputStream extends OutputStream {
            final Writer writer;
            final CharsetDecoder decoder;

            WriterOutputStream(Writer writer) {
                this.writer = writer;
                this.decoder = StandardCharsets.UTF_8.newDecoder();
            }

            public void write(int b) throws IOException {
                writer.write(b);
            }

            public void write(byte[] b) throws IOException {
                writer.write(decoder.decode(ByteBuffer.wrap(b)).array());
            }

            public void write(byte[] b, int off, int len) throws IOException {
                writer.write(decoder.decode(ByteBuffer.wrap(b, off, len)).array());
            }

            public void flush() throws IOException {
                writer.flush();
            }

            public void close() throws IOException {
                writer.close();
            }

        }

    }

    static class LightScanner2 extends LightScannerAdapter {
        private static final int BUF_SIZE = 16 * 1024;
        private final InputStream stream;
        private final StringBuilder builder = new StringBuilder();
        private final byte[] buf = new byte[BUF_SIZE];
        private int ptr;
        private int len;

        public LightScanner2(InputStream stream) {
            this.stream = stream;
        }

        private int read() {
            if (ptr < len) return buf[ptr++];
            reload();
            if (len == -1) return -1;
            return buf[ptr++];
        }

        private void reload() {
            try {
                ptr = 0;
                len = stream.read(buf);
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

        private void load(int n) {
            if (ptr + n <= len) return;
            System.arraycopy(buf, ptr, buf, 0, len - ptr);
            len -= ptr;
            ptr = 0;
            try {
                int r = stream.read(buf, len, BUF_SIZE - len);
                if (r == -1) return;
                len += r;
                if (len != BUF_SIZE) buf[len] = '\n';
            } catch (IOException ex) {
                throw new UncheckedIOException(ex);
            }
        }

        private void skip() {
            while (len != -1) {
                while (ptr < len && isTokenSeparator(buf[ptr])) ptr++;
                if (ptr < len) return;
                reload();
            }
            throw new NoSuchElementException("EOF");
        }

        private void loadToken() {
            builder.setLength(0);
            skip();
            for (int b = read(); !isTokenSeparator(b); b = read()) {
                builder.appendCodePoint(b);
            }
        }

        public String string() {
            loadToken();
            return builder.toString();
        }

        public int ints() {
            skip();
            load(12);
            int b = buf[ptr++];
            boolean negate;
            if (b == '-') {
                negate = true;
                b = buf[ptr++];
            } else negate = false;
            int x = 0;
            for (; !isTokenSeparator(b); b = buf[ptr++]) {
                if ('0' <= b && b <= '9') x = x * 10 + b - '0';
                else throw new NumberFormatException("Unexpected character '" + ((char) b) + "'");
            }
            return negate ? -x : x;
        }

        public void close() {
            try {
                stream.close();
            } catch (IOException e) {
                throw new UncheckedIOException(e);
            }
        }

        private static boolean isTokenSeparator(int b) {
            return b < 33 || 126 < b;
        }

    }

    static abstract class LightScannerAdapter implements AutoCloseable {
        public abstract String string();

        public int ints() {
            return Integer.parseInt(string());
        }

        public final void ints(int[]... arrays) {
            int l = Arrays.stream(arrays).mapToInt(a -> a.length).min().orElse(0);
            for (int i = 0; i < l; i++) {
                for (int j = 0; j < arrays.length; j++) {
                    arrays[j][i] = ints();
                }
            }
        }

        public abstract void close();

    }

    static final class ArrayUtil {
        private ArrayUtil() {
        }

        public static void fill(int[] a, int v) {
            Arrays.fill(a, v);
        }

        public static void fill(int[][] a, int v) {
            for (int i = 0; i < a.length; i++) {
                fill(a[i], v);
            }
        }

        public static void fill(int[][][] a, int v) {
            for (int i = 0; i < a.length; i++) {
                fill(a[i], v);
            }
        }

    }
}

