n = int(input())
A = list(sorted(map(int, input().split())))
q = int(input())
M = list(map(int, input().split()))

R = [[None] * 2000 for i in range(n + 1)]

def solve(A, i, m, n):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans

for i in M:
    if sum(A) < i:
        print('no')
    elif solve(A, 0, i, n):
        print('yes')
    else:
        print('no') n = int(input()) n int(input()) int input() input A = list(sorted(map(int, input().split()))) A list(sorted(map(int, input().split()))) list sorted(map(int, input().split())) sorted map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input M = list(map(int, input().split())) M list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [None] * 2000 for i in range(n + 1) for i in range(n + 1) i range(n + 1) range n + 1 n 1 for i in range(n + 1) [None] * 2000 [None] None 2000 R = [[None] * 2000 for i in range(n + 1)] R [[None] * 2000 for i in range(n + 1)] def solve(A, i, m, n):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans solve if R[i][m] != None:
        return R[i][m]
     R[i][m] != None R[i][m] [i] R i m None return R[i][m] R[i][m] [i] R i m if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans m == 0 m 0 R[i][m] = True R[i][m] [i] R i m True return True True elif i >= n:
        R[i][m] = False
        return False
     i >= n i n R[i][m] = False R[i][m] [i] R i m False return False False ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n) ans solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n) solve(A, i + 1, m, n) solve A i + 1 i 1 m n solve(A, i + 1, m - A[i], n) solve A i + 1 i 1 m - A[i] m A[i] A i n R[i][m] = ans R[i][m] [i] R i m ans return ans ans A A i i m m n n for i in M:
    if sum(A) < i:
        print('no')
    elif solve(A, 0, i, n):
        print('yes')
    else:
        print('no') i M if sum(A) < i:
        print('no')
    elif solve(A, 0, i, n):
        print('yes')
    else:
        print('no') sum(A) < i sum(A) sum A i print('no') print 'no' elif solve(A, 0, i, n):
        print('yes')
     solve(A, 0, i, n) solve A 0 i n print('yes') print 'yes' print('no') print 'no' R = [[None] * 2000 for i in range(n + 1)] [[None] * 2000 for i in range(n + 1)] R M = list(map(int, input().split())) list(map(int, input().split())) M A = list(sorted(map(int, input().split()))) list(sorted(map(int, input().split()))) A n = int(input()) int(input()) n q = int(input()) int(input()) q def solve(A, i, m, n):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans def solve(A, i, m, n):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans solve
n = int(input())
A = list(sorted(map(int, input().split())))
q = int(input())
M = list(map(int, input().split()))

R = [[None] * 2000 for i in range(n + 1)]

def solve(A, i, m, n):
    if R[i][m] != None:
        return R[i][m]
    if m == 0:
        R[i][m] = True
        return True
    elif i >= n:
        R[i][m] = False
        return False
    else:
        ans = solve(A, i + 1, m, n) or solve(A, i + 1, m - A[i], n)
        R[i][m] = ans
        return ans

for i in M:
    if sum(A) < i:
        print('no')
    elif solve(A, 0, i, n):
        print('yes')
    else:
        print('no')