#include <bits/stdc++.h>
using namespace std;
  int a[1001],i,ma=100000,p,n;
  double m1,m2;
int main(){
  for(cin>>n;i<n;i++)cin>>a[i];
  sort(a,a+n);
  m1=(double)(a[n-1]+a[n-2])/(a[1]-a[0]);
  for(i=n-1;i>0;i--)if(a[i]-a[i-1]<=ma){ma=a[i]-a[i-1];p=i;}
  for(i=n-1;i>0;i-=2)if(i!=p){
    m2=(double)(a[i-1]+a[i])/(a[p]-a[p-1]);
    break;
  }
  m1=max(m1,m2);
  printf("%.9f\n",m1);
}