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.
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {
    public static void main(String[] args) {
        InputReader inputReader = new InputReader(System.in);
        PrintWriter printWriter = new PrintWriter(System.out, true);

        int n = inputReader.nextInt();
        Pie[] pies = new Pie[n];
        long r, h;
        for (int i = 0; i < n; i++) {
            r = inputReader.nextInt();
            h = inputReader.nextInt();
            pies[i] = new Pie(r * r * h, i);
        }

        Arrays.sort(pies, ((o1, o2) -> {
            if (o1.volume == o2.volume) {
                return Integer.compare(o2.index, o1.index);
            }
            return Long.compare(o1.volume, o2.volume);
        }));

        Pie currentPie;
        long max;
        MaxSegmentTree tree = new MaxSegmentTree(n);
        for (int i = 0; i < n; i++) {
            currentPie = pies[i];
            max = currentPie.index == 0 ? 0 : tree.findMax(0, currentPie.index);
            long total = max + currentPie.volume;
            tree.update(currentPie.index, total);
        }

        printWriter.print(tree.findMax(0, n - 1) * Math.PI);

        printWriter.close();
    }

    private static class Pie {
        long volume;
        int index;

        public Pie(long volume, int index) {
            this.volume = volume;
            this.index = index;
        }
    }

    private static class MaxSegmentTree {
        int size;
        long[] values;
        int[] startIndex;
        int[] endIndex;

        MaxSegmentTree(int n) {
            size = n;
            values = new long[4 * n];
            startIndex = new int[4 * n];
            endIndex = new int[4 * n];
            configure(0, 0, size - 1);
        }

        void configure(int treeIndex, int start, int end) {
            if (end - start < 0) {
                return;
            }

            startIndex[treeIndex] = start;
            endIndex[treeIndex] = end;
            if (start == end) {
                return;
            }

            int l = left(treeIndex);
            int r = right(treeIndex);
            configure(l, start, (start + end)/2);
            configure(r, (start + end)/2 + 1, end);
        }

        long findMax(int start, int end) {
            return findMax(0, start, end);
        }

        private long findMax(int treeIndex, int start, int end) {
            int i = startIndex[treeIndex];
            int j = endIndex[treeIndex];

            if (i == start && j == end) {
                return values[treeIndex];
            }

            if (i <= start && end <= j) {
                int leftIndex = left(treeIndex);
                int middle = endIndex[leftIndex];
                if (end <= middle) {
                    return findMax(leftIndex, start, end);
                }

                if (start <= middle) {
                    long l = findMax(leftIndex, start, middle);
                    long r = findMax(right(treeIndex), middle + 1, end);
                    return Math.max(l, r);
                }
                return findMax(right(treeIndex), start, end);
            }
            return 0;
        }

        void update(int i, long value) {
            update(0, 0, size - 1, i, value);
        }

        private void update(int treeIndex, int start, int end, int i, long value) {
            if (end - start < 0 || start > i || end < i) {
                return;
            }

            if (end == start) {
                values[treeIndex] = value;
                endIndex[treeIndex] = end;
                startIndex[treeIndex] = start;
                return;
            }

            int l = left(treeIndex);
            int r = right(treeIndex);
            update(l, start, (start + end)/2, i, value);
            update(r, (start + end)/2 + 1, end, i, value);
            values[treeIndex] = Math.max(values[l], values[r]);
            endIndex[treeIndex] = end;
            startIndex[treeIndex] = start;
        }

        private int left(int i) {
            return 2*i + 1;
        }

        private int right(int i) {
            return 2*i + 2;
        }
    }

    private static class InputReader {
        private final BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream in) {
            reader = new BufferedReader(new InputStreamReader(in));
        }

        public int[] nextIntArray(int size) {
            int[] array = new int[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextInt();
            }
            return array;
        }

        public long[] nextLongArray(int size) {
            long[] array = new long[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextLong();
            }
            return array;
        }

        public double[] nextDoubleArray(int size) {
            double[] array = new double[size];
            for (int i = 0; i < size; ++i) {
                array[i] = nextDouble();
            }
            return array;
        }

        public String[] nextStringArray(int size) {
            String[] array = new String[size];
            for (int i = 0; i < size; ++i) {
                array[i] = next();
            }
            return array;
        }

        public boolean[][] nextBooleanTable(int rows, int columns, char trueCharacter) {
            boolean[][] table = new boolean[rows][columns];
            for (int i = 0; i < rows; ++i) {
                String row = next();
                assert row.length() == columns;
                for (int j = 0; j < columns; ++j) {
                    table[i][j] = (row.charAt(j) == trueCharacter);
                }
            }
            return table;
        }

        public char[][] nextCharTable(int rows, int columns) {
            char[][] table = new char[rows][];
            for (int i = 0; i < rows; ++i) {
                table[i] = next().toCharArray();
                assert table[i].length == columns;
            }
            return table;
        }

        public int[][] nextIntTable(int rows, int columns) {
            int[][] table = new int[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextInt();
                }
            }
            return table;
        }

        public long[][] nextLongTable(int rows, int columns) {
            long[][] table = new long[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextLong();
                }
            }
            return table;
        }

        public double[][] nextDoubleTable(int rows, int columns) {
            double[][] table = new double[rows][columns];
            for (int i = 0; i < rows; i++) {
                for (int j = 0; j < columns; j++) {
                    table[i][j] = nextDouble();
                }
            }
            return table;
        }

        public int nextInt() {
            return Integer.parseInt(next());
        }

        public long nextLong() {
            return Long.parseLong(next());
        }

        public double nextDouble() {
            return Double.parseDouble(next());
        }

        public BigInteger nextBigInteger() {
            return new BigInteger(next());
        }

        public boolean hasNext() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                String line = readLine();
                if (line == null) {
                    return false;
                }
                tokenizer = new StringTokenizer(line);
            }
            return true;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                tokenizer = new StringTokenizer(readLine());
            }
            return tokenizer.nextToken();
        }

        public String readLine() {
            String line;
            try {
                line = reader.readLine();
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
            return line;
        }
    }
}