aN = int(input())
A = list(map(int, input().split()))
mN = int(input())
M = list(map(int, input().split()))

def memorize(f) :
    cache = {}
    def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
    return helper

@memorize
def solve(i, m):
    if m == 0:
        return True
    if i >= aN:
        return False
    
    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res

for m in M:
    print("yes" if solve(0, m) else "no") aN = int(input()) aN 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 mN = int(input()) mN 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 def memorize(f) :
    cache = {}
    def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
    return helper memorize cache = {} cache {} def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
     helper if args not in cache :
            cache[args] = f(*args)
         args not in cache args cache cache[args] = f(*args) cache[args] cache args f(*args) f *args args return cache[args] cache[args] cache args *args return helper helper f f def solve(i, m):
    if m == 0:
        return True
    if i >= aN:
        return False
    
    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res solve if m == 0:
        return True
     m == 0 m 0 return True True if i >= aN:
        return False
    
     i >= aN i aN return False False 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 return res res i i m m @memorize solve memorize solve for m in M:
    print("yes" if solve(0, m) else "no") m M print("yes" if solve(0, m) else "no") print "yes" if solve(0, m) else "no" solve(0, m) solve 0 m "yes" "no" mN = int(input()) int(input()) mN aN = int(input()) int(input()) aN A = list(map(int, input().split())) list(map(int, input().split())) A def solve(i, m):
    if m == 0:
        return True
    if i >= aN:
        return False
    
    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res def solve(i, m):
    if m == 0:
        return True
    if i >= aN:
        return False
    
    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res solve def memorize(f) :
    cache = {}
    def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
    return helper def memorize(f) :
    cache = {}
    def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
    return helper memorize M = list(map(int, input().split())) list(map(int, input().split())) M
aN = int(input())
A = list(map(int, input().split()))
mN = int(input())
M = list(map(int, input().split()))

def memorize(f) :
    cache = {}
    def helper(*args) :
        if args not in cache :
            cache[args] = f(*args)
        return cache[args]
    return helper

@memorize
def solve(i, m):
    if m == 0:
        return True
    if i >= aN:
        return False
    
    res = solve(i + 1, m) or solve(i + 1, m - A[i])
    return res

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