def readinput():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))
    return n,a,q,m

def canmake(a,i):
    if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

    for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
    return False   


def main(n,a,q,m):
    for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
    return

def solve(a,i,m):
    if(m==0):
        return True
    if(i>=len(a)):
        return False
    return solve(a,i+1,m) or solve(a,i+1,m-a[i])

def main2(n,a,q,m):
    for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no')


def main3():
    global n
    global a
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    ms=list(map(int,input().split()))
    for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no')

def solve2(i,m):
    global n
    global a
    if(m==0):
        return True
    if(i>=n):
        return False
    return solve2(i+1,m) or solve2(i+1,m-a[i])

def main4():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    S = [0]*(2**n)
    #print(S)
    for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

    for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no')



if __name__=='__main__':
    #n,a,q,m = readinput()
    main4() def readinput():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))
    return n,a,q,m readinput 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 return n,a,q,m return n,a,q,m n a q m def canmake(a,i):
    if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

    for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
    return False    canmake if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

     len(a)==1 len(a) len a 1 if(a==i):
            return True
        else:
            return False

     a==i a i return True True return False False for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
     j range(len(a)) range len(a) len a ii = i-a[j] ii i-a[j] i a[j] a j can=canmake(a[:j-1]+a[j+1:],ii) can canmake(a[:j-1]+a[j+1:],ii) canmake a[:j-1]+a[j+1:] a[:j-1] a :j-1 j-1 j 1 a[j+1:] a j+1: j+1 j 1 ii if(can==True):
            return True
     can==True can True return True True return False False a a i i def main(n,a,q,m):
    for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
    return main for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
     i m ans=canmake(a,i) ans canmake(a,i) canmake a i if(ans==True):
            print('yes')
        else:
            print('no')
     ans==True ans True print('yes') print 'yes' print('no') print 'no' return n n a a q q m m def solve(a,i,m):
    if(m==0):
        return True
    if(i>=len(a)):
        return False
    return solve(a,i+1,m) or solve(a,i+1,m-a[i]) solve if(m==0):
        return True
     m==0 m 0 return True True if(i>=len(a)):
        return False
     i>=len(a) i len(a) len a return False False return solve(a,i+1,m) or solve(a,i+1,m-a[i]) solve(a,i+1,m) or solve(a,i+1,m-a[i]) solve(a,i+1,m) solve a i+1 i 1 m solve(a,i+1,m-a[i]) solve a i+1 i 1 m-a[i] m a[i] a i a a i i m m def main2(n,a,q,m):
    for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no') main2 for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no') mm m ans=solve(a,0,mm) ans solve(a,0,mm) solve a 0 mm if(ans==True):
            print('yes')
        else:
            print('no') ans==True ans True print('yes') print 'yes' print('no') print 'no' n n a a q q m m def main3():
    global n
    global a
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    ms=list(map(int,input().split()))
    for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no') main3 global n global a 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 ms=list(map(int,input().split())) ms list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no') m ms ans=solve2(0,m) ans solve2(0,m) solve2 0 m if(ans==True):
            print('yes')
        else:
            print('no') ans==True ans True print('yes') print 'yes' print('no') print 'no' def solve2(i,m):
    global n
    global a
    if(m==0):
        return True
    if(i>=n):
        return False
    return solve2(i+1,m) or solve2(i+1,m-a[i]) solve2 global n global a if(m==0):
        return True
     m==0 m 0 return True True if(i>=n):
        return False
     i>=n i n return False False return solve2(i+1,m) or solve2(i+1,m-a[i]) solve2(i+1,m) or solve2(i+1,m-a[i]) solve2(i+1,m) solve2 i+1 i 1 m solve2(i+1,m-a[i]) solve2 i+1 i 1 m-a[i] m a[i] a i i i m m def main4():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    S = [0]*(2**n)
    #print(S)
    for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

    for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no') main4 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 S = [0]*(2**n) S [0]*(2**n) [0] 0 2**n 2 n for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

     i range(2**n) range 2**n 2 n b=1 b 1 for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

     j range(n) range n if ( i&b == b):
                S[i] += a[j]
             i&b == b i&b i b b S[i] += a[j] S[i] S i a[j] a j b*=2 b 2 for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no') mm m if (mm in S):
            print('yes')
        else:
            print('no') mm in S mm S print('yes') print 'yes' print('no') print 'no' if __name__=='__main__':
    #n,a,q,m = readinput()
    main4() __name__=='__main__' __name__ '__main__' main4() main4 def main(n,a,q,m):
    for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
    return def main(n,a,q,m):
    for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
    return main def main2(n,a,q,m):
    for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no') def main2(n,a,q,m):
    for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no') main2 def main4():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    S = [0]*(2**n)
    #print(S)
    for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

    for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no') def main4():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    S = [0]*(2**n)
    #print(S)
    for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

    for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no') main4 def canmake(a,i):
    if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

    for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
    return False    def canmake(a,i):
    if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

    for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
    return False    canmake def main3():
    global n
    global a
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    ms=list(map(int,input().split()))
    for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no') def main3():
    global n
    global a
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    ms=list(map(int,input().split()))
    for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no') main3 def readinput():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))
    return n,a,q,m def readinput():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))
    return n,a,q,m readinput def solve2(i,m):
    global n
    global a
    if(m==0):
        return True
    if(i>=n):
        return False
    return solve2(i+1,m) or solve2(i+1,m-a[i]) def solve2(i,m):
    global n
    global a
    if(m==0):
        return True
    if(i>=n):
        return False
    return solve2(i+1,m) or solve2(i+1,m-a[i]) solve2 def solve(a,i,m):
    if(m==0):
        return True
    if(i>=len(a)):
        return False
    return solve(a,i+1,m) or solve(a,i+1,m-a[i]) def solve(a,i,m):
    if(m==0):
        return True
    if(i>=len(a)):
        return False
    return solve(a,i+1,m) or solve(a,i+1,m-a[i]) solve
def readinput():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))
    return n,a,q,m

def canmake(a,i):
    if(len(a)==1):
        if(a==i):
            return True
        else:
            return False

    for j in range(len(a)):
        ii = i-a[j]
        can=canmake(a[:j-1]+a[j+1:],ii) 
        if(can==True):
            return True
    return False   


def main(n,a,q,m):
    for i in m:
        ans=canmake(a,i)
        if(ans==True):
            print('yes')
        else:
            print('no')
    return

def solve(a,i,m):
    if(m==0):
        return True
    if(i>=len(a)):
        return False
    return solve(a,i+1,m) or solve(a,i+1,m-a[i])

def main2(n,a,q,m):
    for mm in m:
        ans=solve(a,0,mm)
        if(ans==True):
            print('yes')
        else:
            print('no')


def main3():
    global n
    global a
    n=int(input())
    a=list(map(int,input().split()))
    q=int(input())
    ms=list(map(int,input().split()))
    for m in ms:
        ans=solve2(0,m)
        if(ans==True):
            print('yes')
        else:
            print('no')

def solve2(i,m):
    global n
    global a
    if(m==0):
        return True
    if(i>=n):
        return False
    return solve2(i+1,m) or solve2(i+1,m-a[i])

def main4():
    n = int(input())
    a = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    S = [0]*(2**n)
    #print(S)
    for i in range(2**n):
        b=1
        for j in range(n):
            #print(i,j,bin(b),i&b)
            if ( i&b == b):
                S[i] += a[j]
            b*=2
    #print(S)

    for mm in m:
        if (mm in S):
            print('yes')
        else:
            print('no')



if __name__=='__main__':
    #n,a,q,m = readinput()
    main4()
