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 CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T bigmod(T p, T e, T M) {
  long long ret = 1;
  for (; e > 0; e >>= 1) {
    if (e & 1) ret = (ret * p) % M;
    p = (p * p) % M;
  }
  return (T)ret;
}
template <class T>
inline T gcd(T a, T b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
template <class T>
inline T modinverse(T a, T M) {
  return bigmod(a, M - 2, M);
}
template <class T>
inline T lcm(T a, T b) {
  a = abs(a);
  b = abs(b);
  return (a / gcd(a, b)) * b;
}
template <class T, class X>
inline bool getbit(T a, X i) {
  T t = 1;
  return ((a & (t << i)) > 0);
}
template <class T, class X>
inline T setbit(T a, X i) {
  T t = 1;
  return (a | (t << i));
}
template <class T, class X>
inline T resetbit(T a, X i) {
  T t = 1;
  return (a & (~(t << i)));
}
inline long long power(long long a, long long b) {
  long long multiply = 1;
  for (int i = (0); i < (b); i++) {
    multiply *= a;
  }
  return multiply;
}
int n;
long long a[100002];
long long Tree[4 * 100002], dp[100002];
struct info {
  long long r, h, id;
  info() {}
  info(long long r, long long h, long long id) : r(r), h(h), id(id) {}
};
void Update(int node, int l, int r, int x, int y, long long val) {
  if (x > r || y < l) return;
  if (x <= l && r <= y) {
    Tree[node] = val;
    return;
  }
  int mid = (l + r) / 2;
  Update(((node) << 1), l, mid, x, y, val);
  Update(((node) << 1 | 1), mid + 1, r, x, y, val);
  Tree[node] = max(Tree[((node) << 1)], Tree[((node) << 1 | 1)]);
}
long long Query(int node, int l, int r, int x, int y) {
  if (x > r || y < l) return 0;
  if (x <= l && r <= y) {
    return Tree[node];
  }
  int mid = (l + r) / 2;
  long long L = Query(((node) << 1), l, mid, x, y);
  long long R = Query(((node) << 1 | 1), mid + 1, r, x, y);
  return max(L, R);
}
vector<info> all;
vector<long long> vol;
bool comp(info a, info b) {
  if (a.r * a.r * a.h == b.r * b.r * b.h) return a.id < b.id;
  return a.r * a.r * a.h < b.r * b.r * b.h;
}
int main() {
  int r, h;
  scanf("%d", &n);
  for (int i = (1); i < (n + 1); i++) {
    scanf("%d%d", &r, &h);
    a[i] = (long long)r * r * h;
    all.push_back(info(r, h, -i));
  }
  sort(all.begin(), all.end(), comp);
  for (int i = (0); i < (all.size()); i++) {
    int idx = -all[i].id;
    long long temp = Query(1, 1, n, 1, idx - 1);
    dp[idx] = temp + a[idx];
    Update(1, 1, n, idx, idx, dp[idx]);
  }
  printf("%0.10lf\n", acos(-1) * (double)Query(1, 1, n, 1, n));
  return 0;
}