#include <bits/stdc++.h>
using namespace std;
bool used[5001];
bool was[100001];
int a[2001];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  vector<int> d;
  sort(a, a + n);
  for (int i = 0; i < n; ++i)
    for (int j = i + 1; j < n; ++j)
      if (!used[a[j] - a[i]]) used[a[j] - a[i]] = 1, d.push_back(a[j] - a[i]);
  sort(d.begin(), d.end());
  vector<int> diff;
  for (int i = 0; i < (int)d.size(); ++i)
    for (int j = i; j < (int)d.size(); ++j)
      if (!was[d[j] + d[i]]) was[d[j] + d[i]] = 1, diff.push_back(d[j] + d[i]);
  sort(diff.begin(), diff.end());
  int it = diff.size() - 1;
  long long cnt = 0;
  for (int i = d.size() - 1; i >= 0; --i) {
    while (diff[it] >= d[i] && it > -1) it--;
    cnt += (long long)(it + 1);
  }
  printf("%.10f", 8.0 * cnt / n / n / n / (n - 1) / (n - 1) / (n - 1));
}
