#include <bits/stdc++.h>
using namespace std;
long long n;
set<pair<long long, long long> > a;
set<pair<long long, long long> >::iterator ii, jj, kk;
int main() {
  cin >> n;
  long long i;
  pair<long long, long long> INF = make_pair(1e18, 1e18);
  a.insert(make_pair(0LL, 0LL));
  a.insert(INF);
  long long ans = 0;
  for (i = 0; i < n; i++) {
    long long q, w;
    cin >> q >> w;
    long long vol = q * q * w;
    a.insert(make_pair(vol, 0LL));
    ii = a.find(make_pair(vol, 0LL));
    jj = ii;
    kk = ii;
    jj--;
    kk++;
    pair<long long, long long> pred = (*jj);
    pair<long long, long long> sled = (*kk);
    long long supp = pred.second + vol;
    ans = max(ans, supp);
    a.erase(make_pair(vol, 0LL));
    if (sled.first == vol && sled.second >= supp)
      continue;
    else {
      while (true) {
        if (sled != INF && sled.second <= supp) {
          kk++;
          a.erase(sled);
          sled = (*kk);
        } else
          break;
      }
      a.insert(make_pair(vol, supp));
    }
  }
  double rez = ans;
  double REZ = rez * 3.14159265359;
  cout << fixed << setprecision(10);
  cout << REZ;
  return 0;
}
