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

public class Main {
    static PrintWriter pw;
    static Scanner sc;
    static long ceildiv(long x, long y) { return (x+y-1)/y; }
    static int mod(long x, int m) { return (int)((x%m+m)%m); }
    static void put(HashMap<Integer, Integer> map, Integer p){if(map.containsKey(p)) map.replace(p, map.get(p)+1); else map.put(p, 1); }
    static void rem(HashMap<Integer, Integer> map, Integer p){ if(map.get(p)==1) map.remove(p);else map.replace(p, map.get(p)-1); }
    static void printf(double x, int dig){ String s="%."+dig+"f"; pw.printf(s, x); }
    static int Int(boolean x){ return x?1:0; }
    static final int inf=(int)1e9, mod=998244353;
    static final long infL=inf*1l*inf;
    static final double eps=1e-9;
    public static long gcd(long x, long y) { return y==0? x: gcd(y, x%y); }
    public static void main(String[] args) throws IOException{
        sc=new Scanner(System.in);
        pw=new PrintWriter(System.out);
//        int t=sc.nextInt();
//        while(t-->0)
        testcase();
        pw.close();
    }
    static void testcase() throws IOException{
        int n=sc.nextInt();
        long[] arr=new long[n];
        for (int i = 0; i < n; i++) {
            int r=sc.nextInt(), h=sc.nextInt();
            arr[i]=r*1l*r*h;
        }
        long[] ans=new long[n];
        Long[] a=new Long[n];
        for (int i = 0; i < n; i++)
            a[i]=arr[i];
        Arrays.sort(a);
        HashMap<Long, Integer> idx=new HashMap<>();
        for (int i = 0; i < n; i++) {
            if(!idx.containsKey(a[i]))
                idx.put(a[i], i);
        }
        SegmentTree tree=new SegmentTree(1<<17);
        long max=0;
        for (int i = 0; i < n; i++) {
            int ind=idx.get(arr[i]);
            ans[i]= tree.query(ind)+arr[i];
            max=Math.max(max, ans[i]);
            tree.set(ind, ans[i]);
        }
        pw.println(max*Math.PI);
    }
    static void printArr(int[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(long[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(double[] arr) {
        for (int i = 0; i < arr.length - 1; i++)
            pw.print(arr[i] + " ");
        pw.println(arr[arr.length - 1]);
    }
    static void printArr(Integer[] arr) {
        for (int i = 0; i < arr.length; i++)
            pw.print(arr[i] + " ");
        pw.println();
    }
    static void printArr(ArrayList<Integer> list) {
        for (int i = 0; i < list.size(); i++)
            pw.print(list.get(i)+" ");
        pw.println();
    }
    static void printArr(boolean[] arr) {
        StringBuilder sb=new StringBuilder();
        for(boolean b: arr)
            sb.append(Int(b));
        pw.println(sb);
    }
    static class Scanner {
        StringTokenizer st;
        BufferedReader br;
        public Scanner(InputStream s) {
            br = new BufferedReader(new InputStreamReader(s));
        }

        public Scanner(FileReader r) {
            br = new BufferedReader(r);
        }

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

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

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

        public String nextLine() throws IOException {
            return br.readLine();
        }

        public double nextDouble() throws IOException {
            return Double.parseDouble(next());
        }
        public int[] nextDigits() throws IOException{
            String s=nextLine();
            int[] arr=new int[s.length()];
            for(int i=0; i<arr.length; i++)
                arr[i]=s.charAt(i)-'0';
            return arr;
        }
        public int[] nextArr(int n) throws IOException {
            int[] arr = new int[n];
            for (int i = 0; i < arr.length; i++)
                arr[i] = nextInt();
            return arr;
        }
        public Integer[] nextsort(int n) throws IOException{
            Integer[] arr=new Integer[n];
            for(int i=0; i<n; i++)
                arr[i]=nextInt();
            return arr;
        }
        public Pair nextPair() throws IOException{
            return new Pair(nextInt(), nextInt());
        }
        public long[] nextLongArr(int n) throws IOException{
            long[] arr=new long[n];
            for (int i = 0; i < n; i++)
                arr[i]=sc.nextLong();
            return arr;
        }
        public Pair[] nextPairArr(int n) throws IOException{
            Pair[] arr=new Pair[n];
            for(int i=0; i<n; i++)
                arr[i]=nextPair();
            return arr;
        }
        public boolean ready() throws IOException {
            return br.ready();
        }
    }
    static class Pair implements Comparable<Pair>{
        int x;
        int y;
        public Pair(int x, int y) {
            this.x=x;
            this.y=y;
        }
        public boolean contains(int a){
            return x==a || y==a;
        }
        public int hashCode() {
            return (this.x*1000000000+this.y);
        }
        public int compareTo(Pair p){
            if(x==p.x)
                return y-p.y;
            return x-p.x;
        }
        public boolean equals(Object obj) {
            if (obj == null) {
                return false;
            }
            if (this.getClass() != obj.getClass()) {
                return false;
            }
            Pair p = (Pair) obj;
            return this.x==p.x && this.y==p.y;
        }
        public Pair clone(){
            return new Pair(x, y);
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public void add(Pair p){
            x+=p.x;
            y+=p.y;
        }
        public Pair negative(){
            return new Pair(-x, -y);
        }
    }
    static class LP implements Comparable<LP>{
        long x, y;
        public LP(long a, long b){
            x=a;
            y=b;
        }
        public void add(LP p){
            x+=p.x;
            y+=p.y;
        }
        public boolean equals(LP p){
            return p.x==x && y==p.y;
        }
        public String toString(){
            return this.x+" "+this.y;
        }
        public int compareTo(LP p){
            int a=Long.compare(x, p.x);
            if(a!=0)
                return a;
            return Long.compare(y, p.y);
        }
    }
    static class Triple implements Comparable<Triple>{
        int x, y, z;
        public Triple(int a, int b, int c){
            x=a;
            y=b;
            z=c;
        }
        public int compareTo(Triple t){
            if(this.y!=t.y)
                return y-t.y;
            return x-t.x;
        }
        public String toString(){
            return x+" "+y+" "+z;
        }
    }
//    static class MaxSegmentTree{
//        int n;
//        long[] tree;
//        public MaxSegmentTree(int len, long[] arr){
//            n=len;
//            build(0, 0, n-1, arr);
//        }
//        public void build(int i, int l, int r, long[] arr){
//            if(l==r){
//                tree[i]=arr[l];
//                return;
//            }
//            int mid=(l+r)/2, left=2*i+1, right=2*i+2;
//            build(left, l, mid, arr);
//            build(right, mid+1, r, arr);
//            tree[i]=Math.max(left, right);
//        }
//        public int query(int i){
//            return query(0, 0, n-1, 0, i);
//        }
//        public int query(int node, int i, int j, int l, int r){
//            if(l>j || r<i)
//                return -1;
//
//        }
//    }
    static class SegmentTree {
        int n;
        long[] tree;
        public SegmentTree(int len) {
            n = len;
            tree=new long[2*n-1];
        }
        public void set(int i, long x){
            i+=n-1;
            tree[i]=x;
            i=(i-1)/2;
            while(true){
                tree[i]=Math.max(tree[i*2+1], tree[i*2+2]);
                if(i==0)
                    break;
                i=(i-1)/2;
            }
        }
        public long query(int x){
            if(x==0)
                return 0;
            return query(0, 0, n-1, 0, x-1);
        }
        public long query(int node, int i, int j, int l, int r){
            if(j<l || i>r)
                return 0;
            if(i>=l && j<=r)
                return tree[node];
            int mid=(i+j)/2, left=node*2+1, right=node*2+2;
            return Math.max(query(left, i, mid, l, r), query(right, mid+1, j, l, r));
        }
    }
}