#include <bits/stdc++.h>
using ll = long long;
using namespace std;
const int N = 1e5 + 1;
int n;
ll ans = 0, p[N];
map<ll, ll> tree;
void update(ll k, ll x) {
  while (k <= 1e12) {
    tree[k] = max(tree[k], x);
    k += k & -k;
  }
}
ll query(ll k) {
  ll ans = 0;
  while (k >= 1) {
    ans = max(ans, tree[k]);
    k -= k & -k;
  }
  return ans;
}
int main() {
  cin.tie(0)->sync_with_stdio(0);
  cin >> n;
  for (int i = 1, r, h; i <= n; i++) {
    cin >> r >> h;
    p[i] = 1ll * r * r * h;
  }
  for (int i = 1; i <= n; i++) {
    ll val = query(p[i] - 1) + p[i];
    ans = max(ans, val);
    update(p[i], val);
  }
  cout << fixed << setprecision(9) << 1.0L * acos(-1) * ans;
}
