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

public class Main {
	public static class Node{
		Node left;
		Node right;
		Node parent;
		double value;
		int index;
		int countLeft;
		int countRight;
		public Node(double value, int index, Node parent,int countLeft,int countRight){
			this.index = index;
			this.value = value;
			this.parent = parent;
			this.countLeft = countLeft;
			this.countRight = countRight;
		}
	}
	public static class BST{
		Node root;
		public BST(double value, int index){
			root = new Node(value, index,null,0,0);
		}
		public int insert(double value, int index, Node curr, Node notBalanced, int lastGreater){
			System.out.println(curr.value);
			System.out.println("left count = " + curr.countLeft);
			System.out.println("right count = " + curr.countRight);
			if(value >= curr.value){
				curr.countRight++;
				if(curr.countRight > curr.countLeft + 1){
					notBalanced.left = curr.left;
					notBalanced.right = curr.right;
					notBalanced.parent = curr.parent;
					notBalanced.index = curr.index;
					notBalanced.value = curr.value;
					notBalanced.countLeft = curr.countLeft;
					notBalanced.countRight = curr.countRight;
				}
				if(curr.right == null){
					curr.right = new Node(value,index,curr,0,0);
					return lastGreater;
				}
				else{
					return insert(value,index,curr.right,notBalanced,lastGreater);
				}
			}
			else{
				curr.countLeft++;
				if(curr.countLeft > curr.countRight + 1){
					notBalanced.left = curr.left;
					notBalanced.right = curr.right;
					notBalanced.parent = curr.parent;
					notBalanced.index = curr.index;
					notBalanced.value = curr.value;
					notBalanced.countLeft = curr.countLeft;
					notBalanced.countRight = curr.countRight;
				}
				if(curr.left == null){
					curr.left = new Node(value,index,curr,0,0);
					return curr.index;
				}
				else{
					return insert(value,index,curr.left,notBalanced,curr.index);
				}
			}
		}
		public Node getLeftMost(Node n,Node notBalanced){
			int val = 1 + notBalanced.countLeft;
			System.out.println("val = " + val);
			n.countLeft += val;
			while(n.left != null){
				n = n.left;
				n.countLeft += val;
			}
			return n;
		}
		public Node getRightMost(Node n,Node notBalanced){
			int val = 1 + notBalanced.countRight;
			System.out.println("val = " + val);
			n.countRight += val;
			while(n.right != null){
				n = n.right;
				n.countRight += val;
			}
			return n;
		}
		public void balance(Node n){
			if(n.countLeft > n.countRight){
				if(n.parent == null){
					Node left = n.left;
					Node rightMost = getRightMost(left,n);
					rightMost.right = n;
					left.parent = null;
					root = left;
					n.parent = rightMost;
					n.left = null;
				}
				else if(n.parent.left != null && n.parent.left.index == n.index){
					n.parent.left = n.left;
					Node left = n.left;
					Node rightMost = getRightMost(left,n);
					rightMost.right = n;
					left.parent = n.parent;
					n.parent = rightMost;
					n.left = null;
				}
				else{
					n.parent.right = n.right;
					Node left = n.left;
					Node rightMost = getRightMost(left,n);
					rightMost.right = n;
					left.parent = n.parent;
					n.parent = rightMost;
					n.left = null;
				}
				n.countLeft = 0;
			}
			else{
				if(n.parent == null){
					Node right = n.right;
					Node leftMost = getLeftMost(right,n);
					leftMost.left = n;
					right.parent = null;
					root = right;
					n.parent = leftMost;
					n.right = null;
				}
				else if(n.parent.right != null && n.parent.right.index == n.index){
					n.parent.right = n.right;
					Node right = n.right;
					Node leftMost = getLeftMost(right,n);
					leftMost.left = n;
					right.parent = n.parent;
					n.parent = leftMost;
					n.right = null;
				}
				else{
					n.parent.left = n.left;
					Node right = n.right;
					Node leftMost = getLeftMost(right,n);
					leftMost.left = n;
					right.parent = n.parent;
					n.parent = leftMost;
					n.right = null;
				}
				n.countRight = 0;
			}
		}
		public int insertHelper(double value, int index, Node curr, Node notBalanced, int lastGreater){
			int result = insert(value, index, curr, notBalanced, lastGreater);
			if(notBalanced.index != -1){
				System.out.println("BALANCE: " + notBalanced.value);
				balance(notBalanced);
			}
			return result;
		}
	}
	public static class Pair implements Comparable<Pair>{
		double value;
		int index;
		public Pair(int index, double value){
			this.index = index;
			this.value = value;
		}
		@Override
		public int compareTo(Pair o) {
			return Double.compare(this.value, o.value);
		}
		@Override
		public boolean equals(Object o){
			return this.index == ((Pair)o).index && this.value == ((Pair)o).value;
		}
	}
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		double[] volume = new double[n];
		for(int i=0;i<n;i++){
			double r = sc.nextDouble();
			double h = sc.nextDouble();
			volume[i] = r * r * h;
		}
		TreeSet<Pair> set = new TreeSet<Pair>();
		double[] dp = new double[n];
		dp[n-1] = volume[n-1];
		set.add(new Pair(n-1,volume[n-1]));
		for(int i=n-2;i>=0;i--){
			Pair higher = set.higher(new Pair(i,volume[i]));
			if(higher != null){
				dp[i] = dp[higher.index];
			}
			dp[i] += volume[i];
			Pair pos = set.floor(new Pair(i,volume[i]));
			while(pos != null && dp[pos.index] <= dp[i]){
				set.remove(pos);
				pos = set.floor(new Pair(i,volume[i]));
			}
			set.add(new Pair(i,volume[i]));
		}
		double max = 0;
		for(int i=0;i<dp.length;i++){
			max = dp[i] > max ? dp[i] : max;
		}
		System.out.println(Math.PI*max);
	}
}