N = int(input()) A = list(map(int, input().split(' '))) M = int(input()) B = list(map(int, input().split(' '))) B = sorted(B, reverse=True) sum = [0 for _ in range(1<