#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
using namespace std;

typedef long long ll;

int n;
int t[20];
vector<int> v[20];

void makePattern(int idx, int cnt, int bit){
  if(cnt > 6) return;
  if(idx == n){
    if(cnt == 6){
      v[n].push_back(bit);
    }
    return;
  }

  makePattern(idx + 1, cnt, bit);
  makePattern(idx + 1, cnt + 1, bit | (1 << idx));
}

bool check(ll x, ll y, ll z){
  return x + y > z && x + z > y && y + z > x;
}

void solve(){
  double ans = 0;

  for(int i = 0; i < v[n].size(); i++){
    vector<int> a;

    for(int j = 0; j < n; j++){
      if(v[n][i] & (1 << j)){
        a.push_back(t[j]);
      }
    }

    sort(a.begin(), a.end());

    do{
      ll A = a[0];
      ll B = a[1];
      ll C = a[2];
      ll X = a[3];
      ll Y = a[4];
      ll Z = a[5];

      if(!check(A, B, C) || !check(A, Y, Z) ||
         !check(B, X, Z) || !check(C, Y, Z)){
        continue;
      }

      A *= A;
      B *= B;
      C *= C;
      X *= X;
      Y *= Y;
      Z *= Z;

      ll V =
        A * X * (B + C - A + Y + Z - X) +
        B * Y * (C + A - B + Z + X - Y) +
        C * Z * (A + B - C + X + Y - Z) -
        A * Y * Z -
        B * Z * X -
        C * X * Y -
        A * B * C;

      ans = max(ans, sqrt((double)V / 144));
    }while(next_permutation(a.begin(), a.end()));
  }

  printf("%.6f\n", ans);
}

int main(){
  for(n = 6; n <= 15; n++){
    makePattern(0, 0, 0);
  }

  while(cin >> n, n){
    for(int i = 0; i < n; i++){
      cin >> t[i];
    }
    solve();
  }
}