Problem: As you know, every birthday party has a cake! This time, Babaei is going to prepare the very special birthday party's cake.

Simple cake is a cylinder of some radius and height. The volume of the simple cake is equal to the volume of corresponding cylinder. Babaei has n simple cakes and he is going to make a special cake placing some cylinders on each other.

However, there are some additional culinary restrictions. The cakes are numbered in such a way that the cake number i can be placed only on the table or on some cake number j where j < i. Moreover, in order to impress friends Babaei will put the cake i on top of the cake j only if the volume of the cake i is strictly greater than the volume of the cake j.

Babaei wants to prepare a birthday cake that has a maximum possible total volume. Help him find this value.

Input

The first line of the input contains a single integer n (1 ≤ n ≤ 100 000) — the number of simple cakes Babaei has.

Each of the following n lines contains two integers ri and hi (1 ≤ ri, hi ≤ 10 000), giving the radius and height of the i-th cake.

Output

Print the maximum volume of the cake that Babaei can make. Your answer will be considered correct if its absolute or relative error does not exceed 10 - 6.

Namely: let's assume that your answer is a, and the answer of the jury is b. The checker program will consider your answer correct, if <image>.

Examples

Input

2
100 30
40 10


Output

942477.796077000


Input

4
1 1
9 7
1 4
10 7


Output

3983.539484752

Note

In first sample, the optimal way is to choose the cake number 1.

In second sample, the way to get the maximum volume is to use cakes with indices 1, 2 and 4.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Arthur Gazizov  [2oo7] - Kazan FU
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskD {
        public void solve(int testNumber, FastScanner in, FastPrinter out) {
            int n = in.nextInt();
            Cake[] cakes = new Cake[n];
            for (int i = 0; i < n; i++) {
                cakes[i] = new Cake(i, MathUtils.sqr(in.nextDouble()) * in.nextDouble());
            }
            Double[] values = new Double[n];
            Arrays.fill(values, 0.0);
            SegmentTree<Double, Double, Double> tree = new SegmentTree<>(values, (arg, index) -> arg, Math::max, Double[]::new, Math::max, arg -> arg);
            Arrays.sort(cakes);
            for (Cake cake : cakes) {
                tree.update(cake.index, tree.get(0, cake.index) + cake.volume);
            }
            out.print(tree.get(0, n - 1) * Math.PI);
        }

    }

    static class SegmentTree<T, E, A> {
        private int n;
        private T[] values;
        private E[] data;
        private Method<E> method;
        private Accessor<E, A> accessor;
        private Merger<A> merger;
        private Converter<T, E> converter;

        public SegmentTree(T[] values, Converter<T, E> converter, Method<E> method, ArrayBuilder<E> arrayBuilder) {
            this.values = values;
            this.n = values.length;
            this.converter = converter;
            data = arrayBuilder.build(n * 4);
            this.method = method;
            build(values, 1, 0, n - 1);
        }

        public SegmentTree(T[] values, Converter<T, E> converter, Method<E> method, ArrayBuilder<E> arrayBuilder, Merger<A> merger) {
            this(values, converter, method, arrayBuilder);
            setMerger(merger);
        }

        public SegmentTree(T[] values, Converter<T, E> converter, Method<E> method, ArrayBuilder<E> arrayBuilder, Merger<A> merger, Accessor<E, A> accessor) {
            this(values, converter, method, arrayBuilder, merger);
            setAccessor(accessor);
        }

        public A get(int l, int r) {
            return func(1, 0, n - 1, l, r);
        }

        public void update(int pos, T newValue) {
            values[pos] = newValue;
            update(1, 0, n - 1, pos, newValue);
        }

        private void build(T[] array, int vertex, int left, int right) {
            if (left == right) {
                data[vertex] = converter.convert(array[left], left);
            } else {
                int middle = (left + right) / 2;
                build(array, vertex * 2, left, middle);
                build(array, vertex * 2 + 1, middle + 1, right);
                data[vertex] = method.mergeData(data[vertex * 2], data[vertex * 2 + 1]);
            }
        }

        private A func(int vertex, int tl, int tr, int l, int r) {
            if (l > r) {
                return null;
            }
            if (l == tl && r == tr) {
                return accessor.get(data[vertex]);
            } else {
                int middle = (tl + tr) / 2;
                A left = func(vertex * 2, tl, middle, l, Math.min(r, middle));
                A right = func(vertex * 2 + 1, middle + 1, tr, Math.max(l, middle + 1), r);
                if (left == null && right == null) return null;
                if (left == null) {
                    return right;
                }
                if (right == null) {
                    return left;
                }
                return merger.merge(left, right);
            }
        }

        private void update(int vertex, int tl, int tr, int pos, T newValue) {
            if (tl == tr) {
                data[vertex] = converter.convert(newValue, tl);
            } else {
                int tm = (tl + tr) / 2;
                if (pos <= tm) {
                    update(vertex * 2, tl, tm, pos, newValue);
                } else {
                    update(vertex * 2 + 1, tm + 1, tr, pos, newValue);
                }
                data[vertex] = method.mergeData(data[vertex * 2], data[vertex * 2 + 1]);
            }
        }

        public void setAccessor(Accessor<E, A> accessor) {
            this.accessor = accessor;
        }

        public void setMerger(Merger<A> merger) {
            this.merger = merger;
        }

    }

    static interface ArrayBuilder<T> {
        T[] build(int length);

    }

    static class FastScanner extends BufferedReader {
        boolean isEOF;

        public FastScanner(InputStream is) {
            super(new InputStreamReader(is));
        }

        public FastScanner(InputStreamReader inputStreamReader) {
            super(inputStreamReader);
        }

        public int read() {
            try {
                int ret = super.read();
                if (isEOF && ret < 0) {
                    throw new InputMismatchException();
                }
                isEOF = ret == -1;
                return ret;
            } catch (IOException e) {
                throw new InputMismatchException();
            }
        }

        public static boolean isWhiteSpace(int c) {
            return c >= -1 && c <= 32;
        }

        public static boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public int nextInt() {
            int c = read();
            while (isWhiteSpace(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int ret = 0;
            while (!isWhiteSpace(c)) {
                if (c < '0' || c > '9') {
                    throw new NumberFormatException("digit expected " + (char) c
                            + " found");
                }
                ret = ret * 10 + c - '0';
                c = read();
            }
            return ret * sgn;
        }

        public double nextDouble() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            double res = 0;
            while (!isSpaceChar(c) && c != '.') {
                if (c == 'e' || c == 'E')
                    return res * Math.pow(10, nextInt());
                if (c < '0' || c > '9')
                    throw new NumberFormatException("digit expected " + (char) c
                            + " found");
                res *= 10;
                res += c - '0';
                c = read();
            }
            if (c == '.') {
                c = read();
                double m = 1;
                while (!isSpaceChar(c)) {
                    if (c == 'e' || c == 'E')
                        return res * Math.pow(10, nextInt());
                    if (c < '0' || c > '9')
                        throw new UnknownError();
                    m /= 10;
                    res += (c - '0') * m;
                    c = read();
                }
            }
            return res * sgn;
        }

        public String readLine() {
            try {
                return super.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }

    }

    static interface Converter<T, E> {
        E convert(T arg, int index);

    }

    static interface Merger<A> {
        A merge(A left, A right);

    }

    static interface Method<E> {
        E mergeData(E left, E right);

    }

    static class Cake implements Comparable<Cake> {
        public int index;
        public double volume;

        public Cake(int index, double volume) {
            this.index = index;
            this.volume = volume;
        }


        public int compareTo(Cake o) {
            int ret = Double.compare(volume, o.volume);
            return ret != 0 ? ret : Integer.compare(o.index, index);
        }


        public boolean equals(Object o) {
            if (this == o) return true;
            if (o == null || getClass() != o.getClass()) return false;

            Cake cake = (Cake) o;

            return Double.compare(cake.volume, volume) == 0;

        }


        public int hashCode() {
            long temp = Double.doubleToLongBits(volume);
            return (int) (temp ^ (temp >>> 32));
        }

    }

    static class MathUtils {
        public static final double sqr(double value) {
            return value * value;
        }

    }

    static interface Accessor<E, A> {
        A get(E arg);

    }

    static class FastPrinter extends PrintWriter {
        public FastPrinter(Writer writer) {
            super(writer);
        }

        public FastPrinter(OutputStream out) {
            super(out);
        }

        public void close() {
            super.close();
        }

    }
}