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.InputStream;
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.BufferedWriter;
import java.io.Writer;
import java.util.TreeMap;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.InputMismatchException;
import java.io.PrintWriter;
import java.io.OutputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 *
 * @author Alex
 */
public class Main {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        TaskD solver = new TaskD();
        solver.solve(1, in, out);
        out.close();
    }
    static class TaskD {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.readInt();
            int[] r = new int[n], h = new int[n];
            IOUtils.readIntArrays(in, r, h);
            long[] v = new long[n];
            for(int i = 0; i < n; i++) v[i] = (long) h[i] * r[i] * r[i];
            TreeMap<Long, Integer> convert = new TreeMap<>();
            for(long val : v) convert.put(val, 0);
            int counter = 0;
            for(long key : convert.keySet()) convert.put(key, counter++);
//        MaxSoft ms = new MaxSoft(n + 1);
            MaxIntSegTree isg = new MaxIntSegTree(n + 1);
            isg.updateRange(0, n, 0);
            long res = 0;
            for(int i = 0; i < n; i++) {
                long vollong = v[i];
                int vol = convert.get(vollong);
//            long before = ms.query(vol - 1, vol - 1);
                long before = (vol - 1 < 0 ? 0 : isg.queryPoint(vol - 1));

                long now = before + vollong;
                res = Math.max(res, now);
                isg.updateRange(vol, n, now);
//            ms.update(vol, n, now);
            }
            out.printLine(res * Math.PI);
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private SpaceCharFilter filter;

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

        public int read() {
            if(numChars == -1)
                throw new InputMismatchException();
            if(curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch(IOException e) {
                    throw new InputMismatchException();
                }
                if(numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int readInt() {
            int c = read();
            while(isSpaceChar(c))
                c = read();
            int sgn = 1;
            if(c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if(c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while(!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if(filter != null)
                return filter.isSpaceChar(c);
            return isWhitespace(c);
        }

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

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for(int i = 0; i < objects.length; i++) {
                if(i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

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

    }

    static class IOUtils {
        public static void readIntArrays(InputReader in, int[]... arrays) {
            for(int i = 0; i < arrays[0].length; i++) {
                for(int j = 0; j < arrays.length; j++)
                    arrays[j][i] = in.readInt();
            }
        }

    }

    static class MaxIntSegTree {
        Node root;

        public MaxIntSegTree(long n) {
            this.root = buildTree(0, n - 1);
        }

        private Node buildTree(long lower, long upper) {
            Node n = new Node(lower, upper);
            if(n.l != n.r) {
                n.lChild = buildTree(lower, (lower + upper) / 2);
                n.rChild = buildTree((lower + upper) / 2 + 1, upper);
            }
            n.v = Long.MIN_VALUE;
            return n;
        }

        public long queryPoint(long i) {
            return queryNode(i, this.root, Long.MIN_VALUE);
        }

        private long queryNode(long i, Node n, long curr_val) {
            curr_val = Math.max(n.v, curr_val);
            if(i == n.l && i == n.r) {
                return curr_val;
            }
            long mid = (n.l + n.r) / 2;
            if(i <= mid) {
                return queryNode(i, n.lChild, curr_val);
            } else if(mid < i) {
                return queryNode(i, n.rChild, curr_val);
            } else {
                long v1 = queryNode(i, n.lChild, curr_val);
                long v2 = queryNode(i, n.rChild, curr_val);
                return Math.max(v1, v2);
            }
        }

        public void updateRange(long lower, long upper, long val) {
            updateNode(lower, upper, val, this.root);
        }

        private void updateNode(long lower, long upper, long val, Node n) {
            long mid = (n.l + n.r) / 2;
            val = Math.max(val, n.v);
            if(lower == n.l && upper == n.r) {
                n.v = val;
            } else if(upper <= mid) {
                updateNode(lower, upper, val, n.lChild);
            } else if(mid < lower) {
                updateNode(lower, upper, val, n.rChild);
            } else {
                updateNode(lower, mid, val, n.lChild);
                updateNode(mid + 1, upper, val, n.rChild);
            }
        }

        private class Node {
            long l;
            long r;
            long v;
            Node lChild;
            Node rChild;

            public Node(long l, long r) {
                this.l = l;
                this.r = r;
                this.lChild = null;
                this.rChild = null;
            }

        }

    }
}