N = int(input()) L = list(map(int, input().split())) Q = int(input()) K = list(map(int, input().split())) # 長さ m の棒を k 本作れるか def can(m: float, k: int) -> bool: cnt = 0 for l in L: cnt += int(l / m) return cnt >= k lmax = max(L) for k in K: lo = 0 hi = lmax ans = lo for _ in range(60): m = (lo + hi) / 2 if can(m, k): ans = max(ans, m) lo = m else: hi = m print(f'{ans:.10f}')