N = int(input()) L = list(map(int, input().split())) Q = int(input()) K = list(map(int, input().split())) num = [] L.sort(reverse = True) for i in range(N): for j in range(500002 // (i + 1)): num.append(L[i] / (j + 1.0)) num.sort(reverse = True) for k in K: print(num[k - 1])