def ALDS1_5A():
    n, A, q = int(input()),list(map(int, input().split())), int(input())
    allFromA = [False]*2001
    for a in A:
        for i in range(2000-a, 0, -1):
            if allFromA[i]:
                allFromA[i+a] = True
        allFromA[a] = True

    for m in input().split():
        if allFromA[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())
    allFromA = [False]*2001
    for a in A:
        for i in range(2000-a, 0, -1):
            if allFromA[i]:
                allFromA[i+a] = True
        allFromA[a] = True

    for m in input().split():
        if allFromA[int(m)]:
            print('yes')
        else:
            print('no') ALDS1_5A n, A, q = int(input()),list(map(int, input().split())), int(input()) n int(input()) int input() input A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q int(input()) int input() input allFromA = [False]*2001 allFromA [False]*2001 [False] False 2001 for a in A:
        for i in range(2000-a, 0, -1):
            if allFromA[i]:
                allFromA[i+a] = True
        allFromA[a] = True

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

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

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

    for m in input().split():
        if allFromA[int(m)]:
            print('yes')
        else:
            print('no')

if __name__ == '__main__':
    ALDS1_5A()