def ALDS1_5A():
    n, A, q = int(input()), list(map(int, input().split())), int(input())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            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())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            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 False for i in range(2001) for i in range(2001) i range(2001) range 2001 for i in range(2001) False S=[False for i in range(2001)] S [False for i in range(2001)] for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
     a A for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
         i range(2001-a, 0, -1) range 2001-a 2001 a 0 -1 if S[i]: S[i+a] = True
         S[i] S i S[a] = True S[a] S a True for mi in input().split():
        if S[int(mi)]:
            print('yes')
        else:
            print('no') mi input().split() ().split () input split if S[int(mi)]:
            print('yes')
        else:
            print('no') S[int(mi)] S int(mi) int mi 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())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            print('yes')
        else:
            print('no') def ALDS1_5A():
    n, A, q = int(input()), list(map(int, input().split())), int(input())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            print('yes')
        else:
            print('no') ALDS1_5A
def ALDS1_5A():
    n, A, q = int(input()), list(map(int, input().split())), int(input())
    S=[False for i in range(2001)]
    for a in A:
        for i in range(2001-a, 0, -1):
            if S[i]: S[i+a] = True
        S[a] = True
    for mi in input().split():
        if S[int(mi)]:
            print('yes')
        else:
            print('no')

if __name__ == '__main__':
    ALDS1_5A()