n = input()
A = input().split(' ')
A.sort()
A.reverse()
q = input()
M = input().split(' ')

A = list(map(int,A))
M = list(map(int,M))
A.sort()

A_sum = [0]
for a in A:
    A_sum.append(a+A_sum[-1])
A_sum.pop(0)

A.reverse()
A_sum.reverse()


#memo = [True]*(len(A))

def search(base, m, n):
    if base == m:
        return True
    if len(A)-1 < n or m - base > A_sum[n]:
        return False
    result = False
    for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
    return result

def print_yn(result):
    if result:
        print('yes')
    else:
        print('no')

for m in M:
#   print(str(m)+':')
    print_yn(search(0,m,0)) n = input() n input() input A = input().split(' ') A input().split(' ') ().split () input split ' ' A.sort() A.sort A sort A.reverse() A.reverse A reverse q = input() q input() input M = input().split(' ') M input().split(' ') ().split () input split ' ' A = list(map(int,A)) A list(map(int,A)) list map(int,A) map int A M = list(map(int,M)) M list(map(int,M)) list map(int,M) map int M A.sort() A.sort A sort A_sum = [0] A_sum [0] 0 for a in A:
    A_sum.append(a+A_sum[-1]) a A A_sum.append(a+A_sum[-1]) A_sum.append A_sum append a+A_sum[-1] a A_sum[-1] A_sum -1 A_sum.pop(0) A_sum.pop A_sum pop 0 A.reverse() A.reverse A reverse A_sum.reverse() A_sum.reverse A_sum reverse def search(base, m, n):
    if base == m:
        return True
    if len(A)-1 < n or m - base > A_sum[n]:
        return False
    result = False
    for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
    return result search if base == m:
        return True
     base == m base m return True True if len(A)-1 < n or m - base > A_sum[n]:
        return False
     len(A)-1 < n or m - base > A_sum[n] len(A)-1 < n len(A)-1 len(A) len A 1 n m - base > A_sum[n] m - base m base A_sum[n] A_sum n return False False result = False result False for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
     i range(len(A)-1,n-1,-1) range len(A)-1 len(A) len A 1 n-1 n 1 -1 if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
     base + A[i] <= m base + A[i] base A[i] A i m if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
     search(base+A[i], m, i+1) search base+A[i] base A[i] A i m i+1 i 1 return True True return result result base base m m n n def print_yn(result):
    if result:
        print('yes')
    else:
        print('no') print_yn if result:
        print('yes')
    else:
        print('no') result print('yes') print 'yes' print('no') print 'no' result result for m in M:
#   print(str(m)+':')
    print_yn(search(0,m,0)) m M print_yn(search(0,m,0)) print_yn search(0,m,0) search 0 m 0 A = list(map(int,A)) list(map(int,A)) A M = list(map(int,M)) list(map(int,M)) M def print_yn(result):
    if result:
        print('yes')
    else:
        print('no') def print_yn(result):
    if result:
        print('yes')
    else:
        print('no') print_yn A = input().split(' ') input().split(' ') A q = input() input() q M = input().split(' ') input().split(' ') M n = input() input() n A_sum = [0] [0] A_sum def search(base, m, n):
    if base == m:
        return True
    if len(A)-1 < n or m - base > A_sum[n]:
        return False
    result = False
    for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
    return result def search(base, m, n):
    if base == m:
        return True
    if len(A)-1 < n or m - base > A_sum[n]:
        return False
    result = False
    for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
    return result search
n = input()
A = input().split(' ')
A.sort()
A.reverse()
q = input()
M = input().split(' ')

A = list(map(int,A))
M = list(map(int,M))
A.sort()

A_sum = [0]
for a in A:
    A_sum.append(a+A_sum[-1])
A_sum.pop(0)

A.reverse()
A_sum.reverse()


#memo = [True]*(len(A))

def search(base, m, n):
    if base == m:
        return True
    if len(A)-1 < n or m - base > A_sum[n]:
        return False
    result = False
    for i in range(len(A)-1,n-1,-1):
        if base + A[i] <= m: # and memo[i]:
#           memo[i] = False
#           print(str(A[i]) + ',' + str(base+A[i]) + ',')
            if search(base+A[i], m, i+1):
                return True
#           memo[i] = True
    return result

def print_yn(result):
    if result:
        print('yes')
    else:
        print('no')

for m in M:
#   print(str(m)+':')
    print_yn(search(0,m,0))