def main():
    n = int(input())
    A = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    sum_list = []
    back = []
    #bit全探索
    for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

    for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no')

main()
 def main():
    n = int(input())
    A = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    sum_list = []
    back = []
    #bit全探索
    for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

    for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no') main 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 sum_list = [] sum_list [] back = [] back [] for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

     i range(1,2**n) range 1 2**n 2 n for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

         j range(n) range n if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

         (i>>j)&1 i>>j i j 1 back.append(A[j]) back.append back append A[j] A j sum = 0 sum 0 for k in back:
            sum += k

         k back sum += k sum k sum_list.append(sum) sum_list.append sum_list append sum back = [] back [] for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no') h range(q) range q if m[h] in sum_list:
            print('yes')
        else:
            print('no') m[h] in sum_list m[h] m h sum_list print('yes') print 'yes' print('no') print 'no' main() main def main():
    n = int(input())
    A = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    sum_list = []
    back = []
    #bit全探索
    for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

    for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no') def main():
    n = int(input())
    A = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    sum_list = []
    back = []
    #bit全探索
    for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

    for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no') main
def main():
    n = int(input())
    A = list(map(int,input().split()))
    q = int(input())
    m = list(map(int,input().split()))

    sum_list = []
    back = []
    #bit全探索
    for i in range(1,2**n):
        for j in range(n):
            if ( (i>>j)&1 ):
                back.append(A[j])

        #print(back)

        sum = 0
        for k in back:
            sum += k

        sum_list.append(sum)

        back = []

    for h in range(q):
        if m[h] in sum_list:
            print('yes')
        else:
            print('no')

main()

