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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.PriorityQueue;
import java.util.StringTokenizer;

public class cakeProblemArchive {


	static PrintWriter pw = new PrintWriter(System.out);
	static final long NINF=-(long)(1e18);
	static final long INF=(long)(1e13);
	//static long memo[] ;//state is the index
	static SegmentTree segmentTree;
	static long vol[];
	public static void main(String[] args) throws  IOException, InterruptedException {
		BufferedReader bf = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st ;
		int n =Integer.parseInt(bf.readLine());
		int N=1;
		while(N<n)N<<=1;
		long[] r=new long[n];
		long[] h=new long[n];
		for(int i=0;i<n;i++) {
			st= new StringTokenizer(bf.readLine());
			r[i]=Long.parseLong(st.nextToken());
			h[i]=Long.parseLong(st.nextToken());
		}
		
		
		vol= new long[N+1];
	
		vol[0]=NINF;
		for(int i=1;i<=N;i++) {
			if(i<=n) {
				vol[i]=r[i-1]*1l*r[i-1]*1l*h[i-1];
			}else {
				vol[i]=NINF;
			}
		}
		HashMap<Long,Integer> map = new HashMap<Long, Integer>();
		long[] volSorted=vol.clone();
		Arrays.sort(volSorted);
		int count=0;
		for(int i=1;i<vol.length;i++)
			if(!map.containsKey(volSorted[i]))
			{map.put(volSorted[i], ++count);
			}
		long[] tmpArr= new long[vol.length];
		segmentTree=new SegmentTree(tmpArr);
		for(int i=1;i<=n;i++) {
			long max=segmentTree.query(1, map.get(vol[i])-1);
			if(max>=0)
			segmentTree.update_point(map.get(vol[i]), max+vol[i]);
			else
				segmentTree.update_point(map.get(vol[i]), vol[i]);
					
		}
		pw.println(Math.PI*segmentTree.query(1, count));
		
		pw.flush();
		pw.close();

	}
	


static public class SegmentTree {

		int N;
		long[] array;
		long[] lazy;
		long[] sTree;

public SegmentTree(long[] arr) {//note arr must be 1 based arr
			array=arr;
			N=arr.length-1;// arr must be power of 2 and 1 based array
			sTree=new long[N<<1]; // no of nodes is 2N-1 but we add 1 to be 1 index
		//	lazy=new int[N<<1];
		//	build(1,1,N);

		}


		public  void build(int v,int b ,int e) {//o(N)
			if(b==e) {
				sTree[v]=array[b];
			}else {
				int mid =(b+e)>>1;
			build((v<<1),b,mid);
			build((v<<1)|1,mid+1,e);
			sTree[v]=Math.max(sTree[v<<1],sTree[(v<<1)|1]);
			}
		}
	

	
public long query(int i, int j) {//O(2log(n))
		return query(1, 1,N,i,j);
	}
	
	public long query(int node , int b ,int e , int i , int j) {
		if(b>j||e<i)return NINF;
		if(b>=i&&e<=j) {
			return sTree[node];
		}
		int mid=(b+e)>>1;
		//	propagate(node, b, mid, e);
		long leftChild =query(node<<1, b,mid,i,j);
		long rightChild =query((node<<1)|1, mid+1,e,i,j);
		return	Math.max( leftChild,rightChild);
	
	}

	public void update_point(int idx , long val) { 
		idx+=N-1;
		if(val>sTree[idx])
		sTree[idx]=val;
		else 
			return;
		while(idx>1) {
			idx>>=1;//divide by 2 to get the parent
			sTree[idx]=Math.max(sTree[(idx<<1)],sTree[(idx<<1)|1]);
		}

	}
//
//
//
//	public void update_range(int i , int j , int val) {
//		update_range(1,1, N, i,j,val);
//	}

//	public void update_range(int node,int b,int e ,int i , int j , int val) {
//		if(e<i||b>j)return;
//		if(b>=i&&e<=j) {
//			sTree[node]+=val;
//			lazy[node]+=val;
//			
//		}else {
//
//			int mid =(b+e)>>1;
//		propagate(node, b , mid , e);
//		update_range(node<<1, b, mid, i, j, val);
//		update_range(node<<1|1, mid+1, e, i, j, val);
//		sTree[node]=Math.min(sTree[node<<1],sTree[node<<1 |1]);
//		}
//	}
//	public void propagateAll() {
//		propagateAll(1, 1,  N);
//	}
//	public void propagateAll(int node ,int b ,int e) {
//		
//		if(b==e)return;
//		int mid =(e+b)>>1;
//		propagate(node, b, mid, e);
//		propagateAll(node<<1,b,mid);
//		propagateAll((node<<1)|1,mid+1,e);
//		
//	}
//	public  void propagate(int node , int b ,int mid , int e) { //O(1)
//		if(lazy[node]==0||b==e)return;
//	
//		lazy[node<<1]+=lazy[node];
//		lazy[node<<1|1]+=lazy[node];
//		sTree[node<<1]+=lazy[node];
//		sTree[node<<1|1]+=lazy[node];
//		sTree[node]=Math.min(sTree[node<<1],sTree[node<<1|1]);
//		
//		lazy[node]=0;
//	}


}



}