#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
long long a[N], b[N];
double c[N];
int lowbit(int k) { return k & (-k); }
double get(int x) {
  double ans = 0;
  while (x > 0) {
    ans = max(ans, c[x]);
    x -= lowbit(x);
  }
  return ans;
}
void update(double x, int m, int n) {
  while (m <= n) {
    c[m] = max(c[m], x);
    m += lowbit(m);
  }
  return;
}
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    long long x, y;
    scanf("%lld %lld", &x, &y);
    a[i] = x * x * y;
    b[i] = a[i];
  }
  sort(a, a + n);
  int k = 1;
  for (int i = 1; i < n; i++) {
    if (a[i] != a[k - 1]) a[k++] = a[i];
  }
  double ans = 0;
  memset(c, 0, sizeof(c));
  for (int i = 0; i < n; i++) {
    int pos = lower_bound(a, a + k, b[i]) - a;
    double sum = get(pos);
    ans = max(ans, sum + b[i]);
    update(sum + b[i], pos + 1, k);
  }
  printf("%.9f\n", 1.0 * ans * acos(-1.0));
  return 0;
}
