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.*;
import java.math.BigDecimal;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;

/*
 * This file was created by ayush in attempt to solve the problem Famil and baba on codeforces
 */
public class FamilAnDBaba {
    HashMap<Long,Integer> rank = new HashMap<Long, Integer>();
    public double maxSumIS(long[] original, int size){
        long[] A = new long[original.length];
        A[rank.get(original[0])] = original[0];

        SegmentTree tree = new SegmentTree(A);
        tree.Construct();
        int rank=0;
        for (int i = 1; i <original.length ; i++) {
            rank=this.rank.get(original[i]);
            if(rank!=0){
                tree.update(rank,original[i]+tree.RangeMax(0,rank-1));
            }else{
                tree.update(rank,original[i]);
            }
        }
        return 1d*Math.PI*tree.RootNode.value;
    }

    public void solve(int n,long[] original,BufferedReader in, PrintWriter out) {


        //
        //out.println(brute(original,n));
        out.println(maxSumIS(original,n));
    }

    public static void main(String[] args)throws IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter out = new PrintWriter(System.out);
        int T = Integer.parseInt(in.readLine());
        long[] volumes = new long[T];
        long[] original = new long[T];
        FamilAnDBaba solver = new FamilAnDBaba();
        for (int i = 0; i < T; i++) {
            int[] rh = IOUtils.readLinearIntArray(in);
            volumes[i]= (long)rh[0]*(long)rh[0]*(long)rh[1];
            original[i]=(long)rh[0]*(long)rh[0]*(long)rh[1];
        }
        Arrays.sort(volumes);
        for (int i = 0; i <volumes.length ; i++) {
            solver.rank.put(volumes[i],i);
        }
        solver.solve(T,original,in, out);
        out.flush();
        out.close();
    }

    static class IOUtils{
        public static int[] readLinearIntArray(BufferedReader in)throws IOException {
            //in.nextLine();
            String[] arr = in.readLine().split(" ");
            int[] array = new int[arr.length];
            for (int i = 0; i < arr.length; i++)
                array[i] = Integer.parseInt(arr[i]);
            return array;
        }

    }
    
    static class Number implements Comparable<Number>{
        long VOL=0;
        int index = -1;
        public Number(int a,int b){
            this.VOL=a;
            this.index = b;
        }


        public int compareTo(Number o) {

            if(this.VOL<o.VOL){
                return -1;

            }else if(this.VOL>o.VOL){
                return 1;

            }


            return 0;
        }
    }

    static class SegmentTreeNode{
        SegmentTreeNode L;
        SegmentTreeNode R;
        int start;
        int end;
        long value;


        public boolean equals(Object obj) {
            return super.equals(obj);
        }
    }
    static class SegmentTree {
        SegmentTreeNode RootNode = new SegmentTreeNode();
        SegmentTreeNode curr = RootNode;
        int compare1 = 0;
        int compare2 = 0;
        boolean empComp1;
        boolean empComp2;
        public long[] SortThis;

        public void Construct(int start, int end, SegmentTreeNode n) {
            if (start == end) {
                n.start = start;
                n.end = end;
                n.value = this.SortThis[start];

            } else {
                SegmentTreeNode Left = new SegmentTreeNode();
                SegmentTreeNode Right = new SegmentTreeNode();
                n.L = Left;
                n.R = Right;
                n.start = start;
                n.end = end;
                Construct(start, (start + end) / 2, n.L);
                Construct(((start + end) / 2) + 1, end, n.R);
                n.value = Math.max(n.L.value, n.R.value);
                //this.curr.L.value=RangeMin(start,(start+end)/2);
                //this.curr.R.value=RangeMin(((start+end)/2)+1,end);
                //this.curr = this.curr.L;

            }

        }

        public void Construct() {
            Construct(0, this.SortThis.length - 1, this.RootNode);
        }


        public long RMQ(int start, int end, SegmentTreeNode n) {
            if (n.start >= start && n.end <= end) {
                return n.value;
            } else if ((n.start < start && n.end < end && n.end < start) || (n.start > start && n.end > end && n.start > end)) {
                return Long.MIN_VALUE;
            } else {
                return Math.max(RMQ(start, end, n.L), RMQ(start, end, n.R));
            }

        }

        private void update(SegmentTreeNode node, int pos, long val) {
            if (node.start == node.end) {
                node.value = val;
            } else {
                if (pos >= node.L.start && pos <= node.L.end) {
                    update(node.L, pos, val);
                } else {
                    update(node.R, pos, val);
                }

                node.value = Math.max(node.L.value, node.R.value);
            }
        }


        public void update(int pos, long val) {
            this.SortThis[pos]=val;
            update(RootNode, pos, val);
        }

        public long RangeMax(int start, int end) {
            return RMQ(start, end, this.RootNode);

        }

        public SegmentTree(long[] nums) {
            this.SortThis = nums;
        }

        public void PrintTree() {

            int ins = 40;
            ArrayList<SegmentTreeNode> nodes = new ArrayList<SegmentTreeNode>();
            int curNodes = 1;
            int nxtNodes = 0;
            nodes.add(RootNode);

            int level = 1;
            System.out.print("level #" + level + ": ");
            while (!nodes.isEmpty()) {
                SegmentTreeNode curr = nodes.get(0);
                nodes.remove(0);
                curNodes--;

                if (curr != null) {

                    for (int i = 0; i < ins; i++) {
                        System.out.print(" ");
                    }
                    System.out.print(curr.value + "[" + curr.start + "," + curr.end + "]");
                    for (int i = 0; i < ins; i++) {
                        System.out.print(" ");
                    }

                    nodes.add(curr.L);
                    nodes.add(curr.R);
                    nxtNodes += 2;
                }

                if (curNodes == 0) {
                    System.out.println();

                    ins /= 2;
                    level++;
                    System.out.print("level #" + level + ": ");
                    curNodes = nxtNodes;
                    nxtNodes = 0;
                }
            }
        }

    }
}