#include <iostream>
#include <iomanip>
#include <vector>
#include <algorithm>

using namespace std;

double calFormula(const int64_t &A, const int64_t &B, const int64_t &C, const int64_t &D)
{
    return (double)(A+B) / (C-D);
}

int main()
{

    int N;
    cin >> N;

    vector<int64_t> list(N);
    for(int i = 0; i < N; i++)
    {
        cin >> list[i];
    }

    sort(list.begin(),list.end());
    reverse(list.begin(),list.end());

    double max_val = 0;
    //loop

    for(int a = 0; a < N; a++)
    {
        if(a > 10){ break; }
        for(int b = a + 1; b < N; b++)
        {
            if(b > 10){ break; }
            for(int c = 0; c < N; c++)
            {
                if(a == c || b == c){ continue; }
                for(int d = c + 1; d < N; d++)
                {
                    if(a == d || b == d){ continue; }
                    max_val = max(max_val, calFormula( list[a], list[b], list[c], list[d] ));
                }
            }
        }
    }


    cout << fixed << setprecision(5);
    cout << max_val << endl;

    return 0;
}