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 Q = int(input[ptr]) ptr += 1 Ks = list(map(int, input[ptr:ptr+Q])) L.sort() max_L = L[-1] for K in Ks: low = 0.0 high = float(max_L) for _ in range(100): mid = (low + high) / 2 if mid == 0: cnt = 0 else: cnt = 0 # Iterate from the end for li in reversed(L): if li < mid: break cnt += li // mid if cnt >= K: break # Early exit if possible if cnt >= K: low = mid else: high = mid print("{0:.15f}".format(low)) if __name__ == '__main__': main()