#include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;

int main() {
	int a;
	cin >> a;
	double MAX = 0;
	int b[1000];
	for (int c = 0; c < a; c++)cin >> b[c];
	sort(b, b + a);
	for (int d = 0; d < a-1; d++) {
		for (int e = d+1; e < a; e++) {
			double sum = 0, k = 0;
			for (int f = a - 1; f != -1; f--) {
				if (f != d&&f != e) {
					sum += b[f];
					k++;
					if (k == 2)break;
				}
			}
			MAX = max(MAX, sum / abs(b[d] - b[e]));
		}
	}
	printf("%.10lf\n", MAX);
}