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 javax.print.DocFlavor;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.nio.file.Paths;
import java.util.*;


public class Main extends PrintWriter {
    static BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
    Main () { super(System.out); }
    public static void main(String[] args) throws IOException{
        Main  d1=new Main   ();d1.main();d1.flush();
    }
    void main() throws IOException {
        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        StringBuilder sb = new StringBuilder();
        PrintWriter out = new PrintWriter(System.out);
        int t=1;
     //   t=i(s()[0]);
        while(t-->0) {
               String[] s1=s();
               int n=i(s1[0]);
               long[] r=new long[n];long[] h=new long[n];
               long[] v=new long[n];
               Pair[] p=new Pair[n];
               for(int i=0;i<n;i++){
                   String[] s2=s();
                   r[i]=i(s2[0]);h[i]=i(s2[1]);
                   v[i]=r[i]*r[i]*h[i];
                   p[i]=new Pair(v[i],i);
               }
               Arrays.sort(p, new Comparator<Pair>() {
                   @Override
                   public int compare(Pair o1, Pair o2) {
                            if(o1.a<o2.a) return -1;
                            else if(o1.a==o2.a) return 0;
                            return 1;
                   }
               });int pre=0;int[] ind=new int[n];
               for(int i=0;i<n;i++){
                   if(i==0||p[i].a==p[i-1].a){
                        ind[p[i].b]=pre;
                   }else{
                        ind[p[i].b]=pre+1;
                       pre++;
                   }
               }long ans=0;st=new long[4*n];
               for(int i=0;i<n;i++){
                   int vol=ind[i];
                   long max=Math.max(0,query(1,0,n-1,0,vol-1));
                   long orgVol=r[i]*r[i]*h[i]+max;
             //      System.out.println(orgVol+" "+max);
                   pointupdate(1,0,n-1,vol,orgVol);
                   ans=Math.max(ans,orgVol);
               }
            System.out.println((double)ans*(Math.PI ));
            for(int i=0;i<n;i++){
         //       System.out.println(Math.PI*(double)(r[i]*r[i]*h[i]));
            }
        }

        System.out.println(sb);

    } long[] st;//new long[4*n];

    long query(int i,int s,int e,int qs,int qe){
        if(qs>e||qe<s) return Integer.MIN_VALUE;
        if(s>=qs&&e<=qe) return st[i];
        int mid=(s+e)/2;
        long l=query(2*i,s,mid,qs,qe);
        long r=query(2*i+1,mid+1,e,qs,qe);
        return Math.max(l,r);
    }
    void pointupdate(int i,int s,int e,int qi,long  a){
        if(s==e){
            st[i]=Math.max(st[i],a);return;
        }
        int mid=(s+e)/2;
        if(qi<=mid) pointupdate(2*i,s,mid,qi,a);
        else pointupdate(2*(i)+1,mid+1,e,qi,a);
        st[i]=Math.max(st[2*i],st[2*i+1]);
    }
    static long gcd(long a, long b) {
        if (b == 0)
            return a;
        return gcd(b, a % b);
    }
     static String[] s() throws IOException {
        return s.readLine().trim().split("\\s+");
    }
    static int i(String ss) {
        return Integer.parseInt(ss);
    }
    static long l(String ss) {
        return Long.parseLong(ss);
    }
    public void arr(long[] a,int n) throws IOException {
        //        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        String[] s2=s();
        for(int i=0;i<n;i++){
            a[i]=l(s2[i]);
        }
    }
    public void arri(int[] a,int n) throws IOException{
        //        BufferedReader s = new BufferedReader(new InputStreamReader(System.in));
        String[] s2=s();
        for(int i=0;i<n;i++){
            a[i]=i(s2[i]);
        }
    }
    public void sort(int[] a,int l,int h){
        if(l==h) return;
        int mid=(l+h)/2;

        sort(a,l,mid);
        sort(a,mid+1,h);
        merge(a,l,(l+h)/2,h);
    }
    void merge(int arr[], int l, int m, int r) {
        int n1 = m - l + 1;
        int n2 = r - m;
        int L[] = new int[n1];
        int R[] = new int[n2];
        for (int i = 0; i < n1; ++i)
            L[i] = arr[l + i];
        for (int j = 0; j < n2; ++j)
            R[j] = arr[m + 1 + j];
        int i = 0, j = 0;
        int k = l;
        while (i < n1 && j < n2) {
            if (L[i] <= R[j]) {
                arr[k] = L[i];
                i++;
            }
            else {
                arr[k] = R[j];
                j++;
            }
            k++;
        }

        while (i < n1) {
            arr[k] = L[i];
            i++;
            k++;
        }
        while (j < n2) {
            arr[k] = R[j];
            j++;
            k++;
        }
    }
}
class Pair {
    long a;
    int b,c,d;
    public Pair(long a,int b){
        this.a=a;this.b=b;
        }
}class Sortbyroll implements Comparator<Pair> {
    public int compare(Pair a, Pair b)
    {
      return a.b-b.b;

    }}