#include <bits/stdc++.h>
using namespace std;
double dp[3][10000];
int main() {
  int N;
  cin >> N;
  vector<int> nos(N);
  for (int i = 0; i < N; i++) cin >> nos[i];
  sort(nos.rbegin(), nos.rend());
  for (int i = 0; i < N; i++)
    for (int j = i + 1; j < N; j++) dp[0][nos[i] - nos[j]] += 1;
  for (int i = 0; i < 10000; i++)
    for (int j = 0; j <= i; j++) dp[1][i] += dp[0][j] * dp[0][i - j];
  for (int i = 1; i < 10000; i++)
    for (int j = 0; i + j < 10000; j++) dp[2][i] += dp[1][j] * dp[0][i + j];
  double total = 0;
  for (int i = 0; i < 10000; i++) total += dp[2][i];
  double den = N;
  den = den * (den - 1) * den * (den - 1) * den * (den - 1) / 8;
  printf("%0.9lf\n", total / den);
  return 0;
}
