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

memo = {}
def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
    return memo[(i, m)]
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 = map(int, input().split()) M map(int, input().split()) map int input().split() ().split () input split memo = {} memo {} def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
    return memo[(i, m)] 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 memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
     memo.get((i, m), None) == None memo.get((i, m), None) memo.get memo get (i, m) i m None None memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i]) memo[(i, m)] memo (i, m) i m 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 memo[(i, m)] memo[(i, m)] memo (i, m) i m 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' q = int(input()) int(input()) q A = list(map(int, input().split())) list(map(int, input().split())) A M = map(int, input().split()) map(int, input().split()) M memo = {} {} memo def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
    return memo[(i, m)] def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
    return memo[(i, m)] solve n = int(input()) int(input()) n
n = int(input())
A = list(map(int, input().split()))
q = int(input())
M = map(int, input().split())

memo = {}
def solve(i, m):
    if m == 0:
        return True
    if i >= n:
        return False
    if memo.get((i, m), None) == None:
        memo[(i, m)] = solve(i + 1, m) or solve(i + 1, m - A[i])
    return memo[(i, m)]
for m in M:
    if solve(0, m):
        print('yes')
    else:
        print('no')