require 'set'
require 'rational'

class Array
	def bsearch_first_index(l = 0, r = size - 1, &pred)
		return nil if l > r
		c = (l + r) / 2 
		if pred[self[c]]
			bsearch_first_index(l, c-1, &pred) || c
		else
			bsearch_first_index(c+1, r, &pred)
		end
	end

	def bsearch_first_item(l = 0, r = size - 1, &pred)
		i = bsearch_first_index(l, r, &pred)
		i ? self[i] : nil
	end
end

n = gets.to_i
as = gets.split.map(&:to_i)

ratios = Set.new
as.each do |a|
    (0..a-1).each do |d|
        ratios << Rational(d, a)
    end
end

ans = ratios.sort.bsearch_first_item {|r|
    d = r * as[0]
    s = ((as[0]-d).ceil .. (as[0]+d).floor).to_a
    as[1..-1].each do |a|
        min, max = a - a * r , a + a * r
        s2 = Set.new
        s.each do |x|
            ((min / x).ceil .. (max / x).floor).each do |k|
                s2 << x * k
            end
        end
        s = s2
    end
    ! s.empty?
}

printf("%.10f\n", ans)