Write a program which reads a sequence _A_ of _n_ elements and an integer _M_ , and outputs "yes" if you can make _M_ by adding elements in _A_ , otherwise "no". You can use an element only once.  You are given the sequence _A_ and _q_ questions where each question contains _M i_.
def check(A, n,  mi):
    i, E, s = 0, [0 for i in range(n)], 0
    while i < n:
        if s == mi: return True
        if E[i] == 0:
            s += A[i]
            E[i] = 1
            i = 0
        else:
            E[i] = 0
            s -= A[i]
            i += 1
    return False

def ALDS1_5A():
    n, A, q = int(input()),list(map(int, input().split())), int(input())
    for m in input().split():
        if check(A, n, int(m)):
            print('Yes')
        else:
            print('no')

if __name__ == '__main__':
    ALDS1_5A()
def ALDS1_5A():
    n, A, q = int(input()), list(map(int, input().split())), int(input())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            print('yes')
        else:
            print('no')

if __name__ == '__main__':
    ALDS1_5A()