def main():
    import sys, itertools as ite
    n = int(sys.stdin.readline())
    A = tuple(map(int, sys.stdin.readline().split()))
    #print(A)
    q = int(sys.stdin.readline())
    M = map(int, sys.stdin.readline().split())
    bit = ite.product([0,1], repeat=n)
    ans = []
    for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
    for m in M:
        if m in ans:
            print('yes')
        else:
            print('no')







if __name__=='__main__':
    main()
 def main():
    import sys, itertools as ite
    n = int(sys.stdin.readline())
    A = tuple(map(int, sys.stdin.readline().split()))
    #print(A)
    q = int(sys.stdin.readline())
    M = map(int, sys.stdin.readline().split())
    bit = ite.product([0,1], repeat=n)
    ans = []
    for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
    for m in M:
        if m in ans:
            print('yes')
        else:
            print('no') main import sys, itertools as ite sys itertools n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline A = tuple(map(int, sys.stdin.readline().split())) A tuple(map(int, sys.stdin.readline().split())) tuple map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split q = int(sys.stdin.readline()) q int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline M = map(int, sys.stdin.readline().split()) M map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split bit = ite.product([0,1], repeat=n) bit ite.product([0,1], repeat=n) ite.product ite product [0,1] 0 1 repeat=n repeat n ans = [] ans [] for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
     b bit tmp = 0 tmp 0 for i in range(n):
            tmp +=b[i]*A[i]
         i range(n) range n tmp +=b[i]*A[i] tmp b[i]*A[i] b[i] b i A[i] A i ans += [tmp] ans [tmp] tmp for m in M:
        if m in ans:
            print('yes')
        else:
            print('no') m M if m in ans:
            print('yes')
        else:
            print('no') m in ans m ans print('yes') print 'yes' print('no') print 'no' if __name__=='__main__':
    main() __name__=='__main__' __name__ '__main__' main() main def main():
    import sys, itertools as ite
    n = int(sys.stdin.readline())
    A = tuple(map(int, sys.stdin.readline().split()))
    #print(A)
    q = int(sys.stdin.readline())
    M = map(int, sys.stdin.readline().split())
    bit = ite.product([0,1], repeat=n)
    ans = []
    for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
    for m in M:
        if m in ans:
            print('yes')
        else:
            print('no') def main():
    import sys, itertools as ite
    n = int(sys.stdin.readline())
    A = tuple(map(int, sys.stdin.readline().split()))
    #print(A)
    q = int(sys.stdin.readline())
    M = map(int, sys.stdin.readline().split())
    bit = ite.product([0,1], repeat=n)
    ans = []
    for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
    for m in M:
        if m in ans:
            print('yes')
        else:
            print('no') main
def main():
    import sys, itertools as ite
    n = int(sys.stdin.readline())
    A = tuple(map(int, sys.stdin.readline().split()))
    #print(A)
    q = int(sys.stdin.readline())
    M = map(int, sys.stdin.readline().split())
    bit = ite.product([0,1], repeat=n)
    ans = []
    for b in bit:
        tmp = 0
        for i in range(n):
            tmp +=b[i]*A[i]
        ans += [tmp]
        
    for m in M:
        if m in ans:
            print('yes')
        else:
            print('no')







if __name__=='__main__':
    main()

