#include <bits/stdc++.h>
using namespace std;
const long long MX = 100000;
const long long MOD = 1000000007;
long long fast_exp(long long base, long long exp, long long mod) {
  long long res = 1;
  while (exp > 0) {
    if (exp % 2 == 1) res = (res * base) % mod;
    base = (base * base) % mod;
    exp /= 2;
  }
  return res;
}
const long double PI = acos(-1);
set<pair<long long, long long> > S;
int main() {
  int n;
  cin >> n;
  long long c = 0;
  while (n--) {
    long long x, y;
    cin >> x >> y;
    long long v = x * x * y;
    long long b = v;
    auto it = S.lower_bound(make_pair(b, 0));
    if (it != S.begin()) {
      --it;
      b += (it->second);
      ++it;
    }
    while (it != S.end()) {
      if (it->second <= b)
        S.erase(it);
      else
        break;
      it = S.lower_bound(make_pair(v, 0));
    }
    S.insert(make_pair(v, b));
    c = max(c, b);
  }
  cout << fixed << acos(-1.0) * c;
  return 0;
}
