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.io.BufferedWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.io.FileInputStream;
import java.util.ArrayList;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.util.Comparator;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
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);
        DBabaeiAndBirthdayCake solver = new DBabaeiAndBirthdayCake();
        solver.solve(1, in, out);
        out.close();
    }

    static class DBabaeiAndBirthdayCake {
        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int n = in.nextInt();
            long[] vol = new long[n];
            long[][] sor_vol = new long[n][2];
            for (int i = 0; i < n; i++) {
                long r = in.nextLong(), h = in.nextLong();
                vol[i] = r * r * h;
                sor_vol[i][1] = vol[i];
                sor_vol[i][0] = i;
            }
            Arrays.sort(sor_vol, Comparator.comparingLong(o -> o[1]));
            int[] rank = new int[n];
            rank[(int) sor_vol[0][0]] = 0;
            for (int i = 1; i < n; i++) {
                long element = sor_vol[i][1];
                int ind = (int) sor_vol[i][0];
                if (sor_vol[i - 1][1] == element) rank[ind] = rank[(int) sor_vol[i - 1][0]];
                else rank[ind] = i;
            }
            DBabaeiAndBirthdayCake.SegmentTree st = new DBabaeiAndBirthdayCake.SegmentTree(n);
            for (int i = 0; i < n; i++) {
                long element = vol[i];
                int pos = rank[i];
                long maxDP = Math.max(element, element + st.query(n, 0, pos - 1));
                st.update(0, 0, n - 1, pos, maxDP);
            }
            out.println(Math.PI * st.maxQuery(0, 0, n - 1, 0, n - 1));
            out.flush();
        }

        static class SegmentTree {
            private long[] st;

            private SegmentTree(int n) {
                int x = (int) Math.ceil(Util.log2(n));
                st = new long[(1 << (1 + x)) - 1];
            }

            private void update(int sti, int sts, int ste, int ind, long val) {
                if (ind < sts || ind > ste) return;
                if (sts == ste) {
                    st[sti] = val;
                    return;
                }
                int mid = Util.getMid(sts, ste);
                update(2 * sti + 1, sts, mid, ind, val);
                update(2 * sti + 2, mid + 1, ste, ind, val);
                st[sti] = Math.max(st[2 * sti + 1], st[2 * sti + 2]);
            }

            private long query(int n, int qs, int qe) {
                if (qs > qe) return 0;
                else return maxQuery(0, 0, n - 1, qs, qe);
            }

            private long maxQuery(int sti, int sts, int ste, int qs, int qe) {
                if (qs > ste || qe < sts) return Long.MIN_VALUE;
                if (sts == ste) return st[sti];
                if (qs <= sts && ste <= qe) return st[sti];
                int mid = Util.getMid(sts, ste);
                return Math.max(maxQuery(2 * sti + 1, sts, mid, qs, qe), maxQuery(2 * sti + 2, mid + 1, ste, qs, qe));
            }

        }

    }

    static class Util {
        public static int getMid(int a, int b) {
            return (a + b) >> 1;
        }

        public static double log2(int num) {
            return Math.log(num) / Math.log(2);
        }

    }

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

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

        public InputReader(FileInputStream file) {
            this.stream = file;
        }

        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 nextInt() {
            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 = (res << 3) + (res << 1) + c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

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

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

    }

    static class OutputWriter {
        private final PrintWriter writer;
        private ArrayList<String> res = new ArrayList<>();
        private StringBuilder sb = new StringBuilder("");

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

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

        public void println(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                sb.append(objects[i]);
            }
            res.add(sb.toString());
            sb = new StringBuilder("");
        }

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

        public void flush() {
            for (String str : res) writer.printf("%s\n", str);
            res.clear();
            sb = new StringBuilder("");
        }

    }
}