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.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.HashSet;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.List;

public class D {
	InputStream is;

	int __t__ = 1;
	int __f__ = 0;
	int __FILE_DEBUG_FLAG__ = __f__;
	String __DEBUG_FILE_NAME__ = "src/T";

	FastScanner in;
	PrintWriter out;

	class State {
		long topVolume;
		long totalVolume;

		State (long topVolume, long totalVolume) {
			this.topVolume = topVolume;
			this.totalVolume = totalVolume;
		}
	}
	
	int lower_bound(long[] a, long key) {
		int lo = -1, hi = a.length;
		while (hi - lo > 1) {
			int mid = (hi + lo) / 2;
			if (a[mid] < key)
				lo = mid;
			else
				hi = mid;
		}
		return hi;
	}

	class SegmentTree {
		private final int INF = 100000000;
		int N;
		int[] minDat;
		long[] maxDat;
		double[] sumDat;
		
		public SegmentTree(int n) {
			N = Integer.highestOneBit(n) << 1;
			int size = (N << 1) - 1;
			// If each function is not necessary, the size of each array should be 1 to save memory.
			minDat = new int[0];
			maxDat = new long[size];
			sumDat = new double[0];
			Arrays.fill(minDat, -INF);
			Arrays.fill(maxDat, 0);
		}

		void minUpdate(int k, int a) {
			k += N - 1;
			minDat[k] = a;
			while (k > 0) {
				k = (k - 1) / 2;
				minDat[k] = Math.min(minDat[k*2 + 1], minDat[k*2 + 2]);
			}
		}
		
		void maxUpdate(int k, long a) {
			k += N - 1;
			maxDat[k] = a;
			while (k > 0) {
				k = (k - 1) / 2;
				maxDat[k] = Math.max(maxDat[k*2 + 1], maxDat[k*2 + 2]);
			}
		}
		
		void sumUpdate(int k, double a) {
			k += N - 1;
			sumDat[k] = a;
			while (k > 0) {
				k = (k - 1) / 2;
				sumDat[k] = sumDat[k*2+1] + sumDat[k*2+2];
			}
		}
		
		private int minQuery(int a, int b, int k, int l, int r) {
			if (r < a || b < l) return INF;
			
			if (a <= l && r <= b) return minDat[k];
			else {
				int vl = minQuery(a, b, k * 2 + 1, l, (l + r) / 2);
				int vr = minQuery(a, b, k * 2 + 2, (l + r) / 2 + 1, r);
				return Math.min(vl, vr);
			}
		}

		private long maxQuery(int a, int b, int k, int l, int r) {
			if (r < a || b < l) return Integer.MIN_VALUE;
			
			if (a <= l && r <= b) return maxDat[k];
			else {
				long vl = maxQuery(a, b, k * 2 + 1, l, (l + r) / 2);
				long vr = maxQuery(a, b, k * 2 + 2, (l + r) / 2 + 1, r);
				return Math.max(vl, vr);
			}
		}
		
		private double sumQuery(int a, int b, int k, int l, int r) {
			if (r < a || b < l) return 0;
			
			if (a <= l && r <= b) return sumDat[k];
			else {
				double vl = sumQuery(a, b, k * 2 + 1, l, (l + r) / 2);
				double vr = sumQuery(a, b, k * 2 + 2, (l + r) / 2 + 1, r);
				return vl + vr;
			}
		}
		
		int getMinQuery(int a, int b) {
			return minQuery(a, b, 0, 0, N - 1);
		}
		
		long getMaxQuery(int a, int b) {
			return maxQuery(a, b, 0, 0, N - 1);
		}
		
		double getSumQuery(int a, int b) {
			return sumQuery(a, b, 0, 0, N - 1);
		}
		
		void display() {
			int[] dat = minDat;
			System.out.println("-------------Segment Tree-------------");
			for (int i = 1; i < dat.length; i *= 2) {
				for (int j = i; j < 2 * i; j++) {
					System.out.print(dat[j-1] + " ");
				}
				System.out.println();
			}
			System.out.println("----------------End------------------");
			System.out.println();
		}
	}
	
	public void solve() {
		int n = in.nextInt();
		long[] r = new long[n];
		long[] h = new long[n];
		for (int i = 0; i < n; i++) {
			r[i] = in.nextInt();
			h[i] = in.nextInt();
		}
		
		long[] volume = new long[n];
		for (int i = 0; i < n; i++) {
			volume[i] = h[i] * r[i] * r[i];
		}
		
		/*
		// { Volume of top of the cake, Maximum total volume} 
		TreeMap<Long, Long> tree = new TreeMap<>();
		tree.put(0L, 0L);
		long res = 0;
		for (int i = 0; i < n; i++) {
			Entry<Long, Long> e = tree.lowerEntry(volume[i]);
			long totalVolume = volume[i] + e.getValue();
			res = Math.max(res, totalVolume);
			if (!tree.containsKey(volume[i]) || tree.get(volume[i]) < totalVolume)
				tree.put(volume[i], totalVolume);
		}
		*/
		
		SegmentTree seg = new SegmentTree(n+10);
		
		HashSet<Long> hash = new HashSet<>();
		long[] orders = new long[n+1];
		int cur = 0;
		orders[cur++] = 0;
		for (int i = 0; i < n; i++) {
			if (!hash.contains(volume[i])) {
				orders[cur++] = volume[i];
			}
			hash.add(volume[i]);
		}
		orders = Arrays.copyOf(orders, cur);
		Arrays.sort(orders);
		
		long res = 0;
		for (int i = 0; i < n; i++) {
			int upper = lower_bound(orders, volume[i]) - 1;
			long nextTotalVolume = seg.getMaxQuery(0, upper) + volume[i];
			seg.maxUpdate(upper+1, nextTotalVolume);
			res = Math.max(res, nextTotalVolume);
		}		
		System.out.println(res * Math.PI);
	}

	public void run() {
		if (__FILE_DEBUG_FLAG__ == __t__) {
			try {
				is = new FileInputStream(__DEBUG_FILE_NAME__);
			} catch (FileNotFoundException e) {
				// TODO 自動生成された catch ブロック
				e.printStackTrace();
			}
			System.out.println("FILE_INPUT!");
		} else {
			is = System.in;
		}
		in = new FastScanner(is);
		out = new PrintWriter(System.out);

		solve();
	}

	public static void main(String[] args) {
		new D().run();
	}

	public void mapDebug(int[][] a) {
		System.out.println("--------map display---------");

		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.printf("%3d ", a[i][j]);
			}
			System.out.println();
		}

		System.out.println("----------------------------");
		System.out.println();
	}

	public void debug(Object... obj) {
		System.out.println(Arrays.deepToString(obj));
	}

	class FastScanner {
		private InputStream stream;
		private byte[] buf = new byte[1024];
		private int curChar;
		private int numChars;

		public FastScanner(InputStream stream) {
			this.stream = stream;
			//stream = new FileInputStream(new File("dec.in"));

		}

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

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

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

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

		int[] nextIntArray(int n) {
			int[] array = new int[n];
			for (int i = 0; i < n; i++)
				array[i] = nextInt();

			return array;
		}

		int[][] nextIntMap(int n, int m) {
			int[][] map = new int[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextIntArray(m);
			}
			return map;
		}

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

		long[] nextLongArray(int n) {
			long[] array = new long[n];
			for (int i = 0; i < n; i++)
				array[i] = nextLong();

			return array;
		}

		long[][] nextLongMap(int n, int m) {
			long[][] map = new long[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextLongArray(m);
			}
			return map;
		}

		double nextDouble() {
			return Double.parseDouble(next());
		}

		double[] nextDoubleArray(int n) {
			double[] array = new double[n];
			for (int i = 0; i < n; i++)
				array[i] = nextDouble();

			return array;
		}

		double[][] nextDoubleMap(int n, int m) {
			double[][] map = new double[n][m];
			for (int i = 0; i < n; i++) {
				map[i] = in.nextDoubleArray(m);
			}
			return map;
		}

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

		String[] nextStringArray(int n) {
			String[] array = new String[n];
			for (int i = 0; i < n; i++)
				array[i] = next();

			return array;
		}

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