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.IOException;
import java.util.Arrays;
import java.util.Comparator;
import java.util.InputMismatchException;

public class BabaeiAndBirthdayCake {
    public static void main(String[] args) {
        FasterScanner sc = new FasterScanner();
        
        int N = sc.nextInt();
        
        Cake[] cakes = new Cake[N];
        for (int i = 0; i < N; i++) {
        	int R = sc.nextInt();
        	int H = sc.nextInt();
        	cakes[i] = new Cake(i, R, H);
        }
        
        Cake[] sorted = Arrays.copyOf(cakes, N);
        Arrays.sort(sorted, new Comparator<Cake>() {
        	public int compare(Cake c1, Cake c2) {
        		return Long.compare(c1.fakeSize, c2.fakeSize);
        	}
		});
        
        for (int i = 1; i < N; i++) {
        	if (sorted[i].fakeSize == sorted[i - 1].fakeSize) {
        		sorted[i].rank = sorted[i - 1].rank;
        	} else {
        		sorted[i].rank = sorted[i - 1].rank + 1;
        	}
        }
        
        SegmentTree st = new SegmentTree(sorted[N - 1].rank + 1);
        st.insert(cakes[0].rank, cakes[0].fakeSize);
        long best = 0;
        for (int i = 0; i < N; i++) {
        	long prevBest = st.get(0, cakes[i].rank - 1);
        	long currBest = prevBest + cakes[i].fakeSize;
        	st.insert(cakes[i].rank, currBest);
        	best = Math.max(best, currBest);
        }
        System.out.println(Math.PI * best);
    }
    
    public static class SegmentTree {
    	public SegmentTreeNode[] leaves;
    	public SegmentTreeNode root;
    	
    	public SegmentTree(int n) {
    		this.leaves = new SegmentTreeNode[n];
    		this.root = new SegmentTreeNode(this, null, 0, n - 1);
    	}
    	
    	// modify the data-type of this segment tree
    	public SegmentTree(long[] vals) {
    		this(vals.length);
    		for (int i = 0; i < vals.length; i++) {
    			this.insert(i,  vals[i]);
    		}
    	}
    	
    	// modify the data-type of this segment tree
    	public void insert(int idx, long v) {
    		this.leaves[idx].setAndUpdate(v);
    	}
    	
    	// modify the data-type of this segment tree
    	public long get(int idx) {
    		return this.leaves[idx].val;
    	}
    	
    	// modify the data-type of this segment tree
    	public long get(int lower, int upper) {
    		return this.root.getRange(lower, upper);
    	}
    	
    	private static class SegmentTreeNode {
    		public int L;
    		public int R;
    		
    		// modify the data-type of this segment tree
    		public long val;
    		
    		public SegmentTree tree;
    		public SegmentTreeNode parent;
    		public SegmentTreeNode left;
    		public SegmentTreeNode rite;
    		
    		public SegmentTreeNode(SegmentTree t, SegmentTreeNode p, int lower, int upper) {
    			this.tree = t;
    			this.parent = p;
    			this.L = lower;
    			this.R = upper;
    			
    			if (lower == upper) {
    				this.tree.leaves[lower] = this;
    			} else {
    				int mid = (lower + upper) / 2;
    				this.left = new SegmentTreeNode(tree, this, lower, mid);
    				this.rite = new SegmentTreeNode(tree, this, mid + 1, upper);
    			}
    		}

    		// modify the data-type of this segment tree
    		public void setAndUpdate(long v) {
    			this.val = v;
    			this.update();
    		}
    		
    		// modify the function (i.e. max, min, sum, etc.) in this method
    		public void update() {
    			if (this.left != null && this.rite != null) {
    				this.val = Math.max(this.left.val, this.rite.val);
    			} else if (this.left != null) {
    				this.val = this.left.val;
    			} else if (this.rite != null) {
    				this.val = this.rite.val;
    			}
    			
    			if (this.parent != null) {
    				this.parent.update();
    			}
    		}
    		
    		// modify the function & the default return value in this method
    		public long getRange(int lower, int upper) {
    			if (this.L >= lower && this.R <= upper) {
    				return this.val;
    			} else if (this.L > upper || this.R < lower) {
    				// modify the default value here (if it's not found)
    				return 0;
    			} else {
    				// modify the function that this Segment Tree uses
    				return Math.max(this.left.getRange(lower, upper), this.rite.getRange(lower, upper));
    			}
    		}
    	}
    }
    
    public static class Cake {
    	public int index;
    	public int R, H;
    	
    	public long fakeSize;
    	public int rank;
    	
    	public Cake(int i, int r, int h) {
    		this.index = i;
    		this.R = r;
    		this.H = h;
    		this.fakeSize = (long)R * R * H;
    	}
    }

	public static class FasterScanner {
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public int read() {
			if (numChars == -1)
				throw new InputMismatchException();
			if (curChar >= numChars) {
				curChar = 0;
				try {
					numChars = System.in.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (numChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public String nextLine() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isEndOfLine(c));
			return res.toString();
		}

		public String nextString() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = read();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public long nextLong() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			long res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int nextInt() {
			int c = read();
			while (isSpaceChar(c))
				c = read();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = read();
			}
			int res = 0;
			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while (!isSpaceChar(c));
			return res * sgn;
		}

		public int[] nextIntArray(int n) {
			int[] arr = new int[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextInt();
			}
			return arr;
		}

		public int[] nextIntArray(int n, int offset) {
			int[] arr = new int[n + offset];
			for (int i = 0; i < n; i++) {
				arr[i + offset] = nextInt();
			}
			return arr;
		}

		public long[] nextLongArray(int n) {
			long[] arr = new long[n];
			for (int i = 0; i < n; i++) {
				arr[i] = nextLong();
			}
			return arr;
		}

		public long[] nextLongArray(int n, int offset) {
			long[] arr = new long[n + offset];
			for (int i = 0; i < n; i++) {
				arr[i + offset] = nextLong();
			}
			return arr;
		}

		private boolean isSpaceChar(int c) {
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		private boolean isEndOfLine(int c) {
			return c == '\n' || c == '\r' || c == -1;
		}
	}
}