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

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

solved_dict = {}
n = int(input())
A = list(map(int, input().split()))
q = int(input())
for m in list(map(int, input().split())):
    print("yes" if solve(0, m) else "no")
