#include <bits/stdc++.h>
using namespace std;
const long long MAX = 2500000000;
const int inf = 123456789;
const double EPS = 1e-9;
const double PI = 2 * asin(1.0);
const long long mod = 1e9 + 7;
int double_cmp(double x, double y = 0, double tol = EPS) {
  return (x <= y + tol) ? (x + tol < y) ? -1 : 0 : 1;
}
vector<int> vetor;
int aux[3000];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &aux[i]);
  for (int i = 0; i < n; ++i) {
    for (int j = i + 1; j < n; ++j) {
      vetor.push_back(abs(aux[i] - aux[j]));
    }
  }
  sort(vetor.begin(), vetor.end());
  int i = 0;
  double temp = (n - 1) + ((n - 1) * (n - 1));
  temp *= 0.5;
  while (vetor[i] * 2 < vetor[((int)vetor.size()) - 1]) i++;
  int j = ((int)vetor.size()) - 1;
  while (vetor[j] > 2 * vetor[i - 1]) j--;
  j = ((int)vetor.size()) - j - 1;
  printf("%.11lf\n", (i / temp) * (i / temp) * (j / temp));
}
