inputs = $stdin.read.split("\n")
count = inputs.first.to_i
samples = inputs.last.split(' ').map(&:to_f).sort

samples_1 = samples
samples_2 = samples - [samples.min]

distance = 9999999999999999999999
min_dis_index = 0
samples_2.each_with_index do |v, i|
  if (v - samples_1[i]) < distance
    distance = v - samples_1[i]
    min_dis_index = i
  end
end

d = samples_1[min_dis_index]
c = samples_2[min_dis_index]

a = (samples - [d, c]).max
samples = (samples - [d, c]) - [a]
b = samples.max
samples = samples - [b]

result_1 = (a + b) / (c - d)

# puts result_1
# puts "A:#{a}, B:#{b},C:#{c}, D:#{d}"

a = samples.max
samples = samples - [a]
b = samples.max
samples = samples - [b]

samples = inputs.last.split(' ').map(&:to_f).sort

a = samples.max
samples = samples - [a]
b = samples.max
samples = samples - [b]

samples_1 = samples
samples_2 = samples - [samples.min]

distance = 9999999999999999999999
min_dis_index = 0
samples_2.each_with_index do |v, i|
  if (v - samples_1[i]) < distance
    distance = v - samples_1[i]
    min_dis_index = i
  end
end

d = samples_1[min_dis_index]
c = samples_2[min_dis_index]

result_2 = (a + b) / (c - d)

# puts result_2
# puts "A:#{a}, B:#{b},C:#{c}, D:#{d}"

puts [result_1, result_2].min