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

d = {}

def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if (i, m) in d:
        return d[i, m]
    res = solve(i + 1,  m) or solve(i + 1, m - A[i])
    d[i,m] = res
    return res

for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no')
 n = int(input()) n int(input()) int input() input A = list(map(int,input().split())) A list(map(int,input().split())) list 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 d = {} d {} def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if (i, m) in d:
        return d[i, m]
    res = solve(i + 1,  m) or solve(i + 1, m - A[i])
    d[i,m] = res
    return res solve if m == 0:
        return True
     m == 0 m 0 return True True if i >= n:
        return False
     i >= n i n return False False if (i, m) in d:
        return d[i, m]
     (i, m) in d (i, m) i m d return d[i, m] d[i, m] d i res = solve(i + 1,  m) or solve(i + 1, m - A[i]) res solve(i + 1,  m) or solve(i + 1, m - A[i]) solve(i + 1,  m) solve i + 1 i 1 m solve(i + 1, m - A[i]) solve i + 1 i 1 m - A[i] m A[i] A i d[i,m] = res d[i,m] d i res return res res i i m m for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no') m M if solve(0, m):
        print('yes')
    else:
        print('no') solve(0, m) solve 0 m print('yes') print 'yes' print('no') print 'no' A = list(map(int,input().split())) list(map(int,input().split())) A def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if (i, m) in d:
        return d[i, m]
    res = solve(i + 1,  m) or solve(i + 1, m - A[i])
    d[i,m] = res
    return res def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if (i, m) in d:
        return d[i, m]
    res = solve(i + 1,  m) or solve(i + 1, m - A[i])
    d[i,m] = res
    return res solve n = int(input()) int(input()) n M = list(map(int, input().split())) list(map(int, input().split())) M q = int(input()) int(input()) q d = {} {} d
n = int(input())
A = list(map(int,input().split()))
q = int(input())
M = list(map(int, input().split()))

d = {}

def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if (i, m) in d:
        return d[i, m]
    res = solve(i + 1,  m) or solve(i + 1, m - A[i])
    d[i,m] = res
    return res

for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no')

