import bisect

def main():
    import sys
    input = sys.stdin.read().split()
    ptr = 0
    N = int(input[ptr])
    ptr += 1
    L = list(map(int, input[ptr:ptr+N]))
    ptr += N
    L.sort()
    Q = int(input[ptr])
    ptr += 1
    K_list = list(map(int, input[ptr:ptr+Q]))
    ptr += Q
    
    sum_L = sum(L)
    
    for K in K_list:
        if K == 0:
            print("0.0")
            continue
        low = 0.0
        high = sum_L / K if K != 0 else float('inf')
        
        for _ in range(100):
            mid = (low + high) / 2
            if mid == 0.0:
                total = 0
            else:
                p = bisect.bisect_left(L, mid)
                total = 0
                for i in range(p, N):
                    total += L[i] // mid
                    if total >= K:
                        break
            if total >= K:
                low = mid
            else:
                high = mid
        print("{0:.15f}".format(low))
        
if __name__ == '__main__':
    main()