def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    sa=[0]*100000
    for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
    for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes')

if __name__ == '__main__':
    resolve() def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    sa=[0]*100000
    for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
    for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes') resolve 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=list(map(int,input().split())) m list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split sa=[0]*100000 sa [0]*100000 [0] 0 100000 for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
     i range(2**n) range 2**n 2 n s=0 s 0 for j in range(n):
            if i>>j&1:
                s+=a[j]
         j range(n) range n if i>>j&1:
                s+=a[j]
         i>>j&1 i>>j i j 1 s+=a[j] s a[j] a j sa[s]=1 sa[s] sa s 1 for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes') i m if sa[i]==0:
            print('no')
        else:
            print('yes') sa[i]==0 sa[i] sa i 0 print('no') print 'no' print('yes') print 'yes' if __name__ == '__main__':
    resolve() __name__ == '__main__' __name__ '__main__' resolve() resolve def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    sa=[0]*100000
    for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
    for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes') def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    sa=[0]*100000
    for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
    for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes') resolve
def resolve():
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    sa=[0]*100000
    for i in range(2**n):
        s=0
        for j in range(n):
            if i>>j&1:
                s+=a[j]
        sa[s]=1
    for i in m:
        if sa[i]==0:
            print('no')
        else:
            print('yes')

if __name__ == '__main__':
    resolve()
