#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <stack>
using namespace std;

typedef long long ll;
typedef pair<int, int> P;

#define pb push_back
#define rep(i, a, n) for(int i = (a); i < (n); i++)
#define dep(i, a, n) for(int i = (a); i >= (n); i--)
#define mod 1e9+7

int main() {
  int n;
  cin >> n;
  double a[1000];
  rep(i, 0, n) cin >> a[i];
  sort(a, a + n);
  double s1 = (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2]);
  double s2 = (a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3]);
  double m = 1145141919;
  rep(i, 0, n - 2) m = min(m, a[i + 1] - a[i]);
  cout << fixed << max((a[n - 1] + a[n - 2]) / m, max(s1, s2)) << endl;
}