N different natural numbers are given. If you select four different ones and set them as $ A $, $ B $, $ C $, $ D $, the following formula

$ \ Frac {A + B} {C --D} $



I want to find the maximum value of.




Given N different natural numbers, choose 4 different from them and create a program to find the maximum value of the above formula.



Input

The input is given in the following format.


N
a1 a2 ... aN


The number N (4 ≤ N ≤ 1000) of natural numbers is given in the first line. The value ai (1 ≤ ai ≤ 108) of each natural number is given in the second line. However, the same natural number does not appear more than once (ai ≠ aj for i ≠ j).

Output

Outputs the maximum value of the above formula as a real number for a given N natural numbers. However, the error must not exceed plus or minus 10-5.

Examples

Input

10
1 2 3 4 5 6 7 8 9 10


Output

19.00000


Input

5
22 100 42 3 86


Output

9.78947


Input

6
15 21 36 10 34 5


Output

18.00000


Input

4
100000 99999 8 1


Output

28571.285714

Difficulty: UNKNOWN_DIFFICULTY

Starter code:

Solutions:
n = int(input())
a = sorted(map(int, input().split()))
b = [(a[i + 1] - a[i], i) for i in range(n - 1)]
b.sort(key=lambda x: x[0])
if b[0][1] < n - 2:
	print((a[-1] + a[-2]) / b[0][0])
elif b[0][1] == n - 3:
	if b[1][1] == n - 2:
		print(max((a[-1] + a[-2]) / b[2][0], (a[-1] + a[-4]) / b[0][0], (a[-3] + a[-4]) / b[1][0]))
	else:
		print(max((a[-1] + a[-2]) / b[1][0], (a[-1] + a[-4]) / b[0][0]))
elif b[1][1] == n - 3:
	print(max((a[-1] + a[-2]) / b[2][0], (a[-1] + a[-4]) / b[1][0], (a[-3] + a[-4]) / b[0][0]))
else:
	print(max((a[-1] + a[-2]) / b[1][0], (a[-3] + a[-4]) / b[0][0]))


from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random

def LI():
	return list(map(int, sys.stdin.readline().split()))

def I():
	return int(sys.stdin.readline())

def LS():
	return list(map(list, sys.stdin.readline().split()))

def S():
	return list(sys.stdin.readline())[:-1]

def IR(n):
	l = [None for i in range(n)]
	for i in range(n):
		l[i] = I()
	return l

def LIR(n):
	l = [None for i in range(n)]
	for i in range(n):
		l[i] = LI()
	return l

def SR(n):
	l = [None for i in range(n)]
	for i in range(n):
		l[i] = S()
	return l

def LSR(n):
	l = [None for i in range(n)]
	for i in range(n):
		l[i] = LS()
	return l
sys.setrecursionlimit(1000000)
mod = 1000000007

def A():
	e = LI()
	d = defaultdict(int)
	for i in e:
		d[i] += 1
	for i in d.values():
		if i != 2:
			print('no')
			break
	else:
		print('yes')
	return

def B():
	n = I()
	a = LI()
	a.sort()
	ans = -float('inf')
	for c in range(n):
		for d in range(c):
			m = a[c] - a[d]
			for i in range(n)[::-1]:
				if i != c and i != d:
					e = i
					break
			for i in range(e)[::-1]:
				if i != c and i != d:
					b = i
					break
			ans = max(ans, (a[e] + a[b]) / m)
	print(ans)
	return

def C():
	return

def D():
	return

def E():
	return

def F():
	return

def G():
	return

def H():
	return

def I_():
	return

def J():
	return
B()


n = int(input())
(*A,) = map(int, input().split())
A.sort(reverse=1)
ans = 0
for i in range(n):
	for j in range(i + 1, n):
		p = q = 0
		while p in [i, j]:
			p += 1
		while q in [i, j, p]:
			q += 1
		ans = max(ans, (A[p] + A[q]) / (A[i] - A[j]))
print('%.6f' % ans)


n = int(input())
alst = sorted(list(map(int, input().split())))
ans = 0
for i in range(n):
	for j in range(i + 1, n):
		c = alst[j]
		d = alst[i]
		if j <= n - 3:
			(a, b) = (alst[n - 1], alst[n - 2])
		elif i >= n - 2:
			(a, b) = (alst[n - 3], alst[n - 4])
		elif j == n - 1 and i == n - 3:
			(a, b) = (alst[n - 2], alst[n - 4])
		elif j == n - 2 and i == n - 3:
			(a, b) = (alst[n - 1], alst[n - 4])
		elif j == n - 1 and i == n - 4:
			(a, b) = (alst[n - 2], alst[n - 3])
		elif j == n - 2 and i == n - 4:
			(a, b) = (alst[n - 1], alst[n - 3])
		ans = max(ans, (a + b) / (c - d))
print(ans)


n = int(input())
A = [int(i) for i in input().split()]
A.sort()
ans = 0.0
for i in range(1, n):
	cd = int(A[i]) - int(A[i - 1])
	if i == n - 1:
		ab = int(A[n - 3]) + int(A[n - 4])
	elif i == n - 2:
		ab = int(A[n - 1]) + int(A[n - 4])
	else:
		ab = int(A[n - 1]) + int(A[n - 2])
	ans = max(ans, ab / cd)
print(ans)


n = int(input())
a = [int(num) for num in input().split()]
ans = 0.0
a.sort()
for i in range(n - 2):
	ans = max(ans, (a[n - 1] + a[n - 2]) / (a[i + 1] - a[i] + 0.0))
ans = max(ans, (a[n - 1] + a[n - 4]) / (a[n - 2] - a[n - 3] + 0.0))
ans = max(ans, (a[n - 3] + a[n - 4]) / (a[n - 1] - a[n - 2] + 0.0))
print('%.8f' % ans)


import copy
n = int(input())
data = list(map(int, input().split()))
data.sort()
data1 = copy.copy(data)
A = data1.pop()
B = data1.pop()
n_1 = n - 2
min = 100000000
for i in range(n_1 - 1):
	if data1[i + 1] - data1[i] < min:
		min = data1[i + 1] - data1[i]
		C = data1[i + 1]
		D = data1[i]
ans_1 = (A + B) / (C - D)
data2 = copy.copy(data)
min = 100000000
for i in range(n - 1):
	if data2[i + 1] - data2[i] < min:
		min = data2[i + 1] - data2[i]
		C = data2[i + 1]
		D = data2[i]
data2.remove(C)
data2.remove(D)
A = data2.pop()
B = data2.pop()
ans_2 = (A + B) / (C - D)
print(max(ans_1, ans_2))


n = int(input())
li = list(map(int, input().split()))
li2 = li.copy()
so0 = sorted(li)
diffs = dict()
for i in range(len(li) - 1):
	diffs[i] = so0[i + 1] - so0[i]
soDiffs = sorted(diffs.items(), key=lambda pair: pair[1])
ma = 0
for (idx, diff) in soDiffs:
	so = so0.copy()
	d = so[idx]
	c = so[idx + 1]
	so.remove(c)
	so.remove(d)
	(a, b) = so[-2:]
	exp = (a + b) / (c - d)
	if exp > ma:
		ma = exp
	else:
		print(ma)
		break


n = int(input())
a = sorted(list(map(int, input().split())))
ans = -0.1
for j in range(n):
	for i in range(j):
		C = a[j]
		D = a[i]
		k = n - 1
		while k == j or k == i:
			k -= 1
		A = a[k]
		k -= 1
		while k == j or k == i:
			k -= 1
		B = a[k]
		ans = max(ans, (A + B) / (C - D))
print(ans)


N = int(input())
a = [int(i) for i in input().split()]
a.sort()
a.reverse()
ans = (a[2] + a[3]) / (a[0] - a[1])
ans = max(ans, (a[1] + a[3]) / (a[0] - a[2]))
for j in range(3, N):
	ans = max(ans, (a[1] + a[2]) / (a[0] - a[j]))
ans = max(ans, (a[0] + a[3]) / (a[1] - a[2]))
for j in range(3, N):
	ans = max(ans, (a[0] + a[2]) / (a[1] - a[j]))
for i in range(2, N):
	for j in range(i + 1, N):
		ans = max(ans, (a[0] + a[1]) / (a[i] - a[j]))
print(ans)


n = int(input())
S = list(map(int, input().split()))
res = 0.0
S.sort()
for d in range(n - 1):
	c = d + 1
	a = n - 1
	b = n - 2
	if d == n - 3:
		b = d - 1
	elif d == n - 2:
		a = d - 2
		b = d - 1
	res = max(res, 1.0 * (S[a] + S[b]) / (S[c] - S[d]))
print(res)