from sys import stdin

n = int(input())
A = list(map(int, stdin.readline().split()))
q = int(input())
m = list(map(int, stdin.readline().split()))

def solve(i,m):
    '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    '''
    if m == 0:
        return True
    if sum(A[i:]) < m:
        return False
    if i >= n:
        return False
    res = solve(i+1,m) or solve(i+1,m-A[i])
    return res

for a in m:
    if solve(0,a):
        print("yes")
    else:
        print("no")
 from sys import stdin n = int(input()) n int(input()) int input() input A = list(map(int, stdin.readline().split())) A list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split q = int(input()) q int(input()) int input() input m = list(map(int, stdin.readline().split())) m list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split def solve(i,m):
    '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    '''
    if m == 0:
        return True
    if sum(A[i:]) < m:
        return False
    if i >= n:
        return False
    res = solve(i+1,m) or solve(i+1,m-A[i])
    return res solve '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    ''' if m == 0:
        return True
     m == 0 m 0 return True True if sum(A[i:]) < m:
        return False
     sum(A[i:]) < m sum(A[i:]) sum A[i:] A i: i m return False False if i >= n:
        return False
     i >= n i n 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 for a in m:
    if solve(0,a):
        print("yes")
    else:
        print("no") a m if solve(0,a):
        print("yes")
    else:
        print("no") solve(0,a) solve 0 a print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q n = int(input()) int(input()) n m = list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) m def solve(i,m):
    '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    '''
    if m == 0:
        return True
    if sum(A[i:]) < m:
        return False
    if i >= n:
        return False
    res = solve(i+1,m) or solve(i+1,m-A[i])
    return res def solve(i,m):
    '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    '''
    if m == 0:
        return True
    if sum(A[i:]) < m:
        return False
    if i >= n:
        return False
    res = solve(i+1,m) or solve(i+1,m-A[i])
    return res solve A = list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) A
from sys import stdin

n = int(input())
A = list(map(int, stdin.readline().split()))
q = int(input())
m = list(map(int, stdin.readline().split()))

def solve(i,m):
    '''
    i番目以降の要素を使用してmを作れる場合、trueを返す
    '''
    if m == 0:
        return True
    if sum(A[i:]) < m:
        return False
    if i >= n:
        return False
    res = solve(i+1,m) or solve(i+1,m-A[i])
    return res

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

