# encoding: utf-8


import sys

__input = sys.stdin.readlines()
length_1 = int(__input[0])
array_1 = list(map(int, __input[1].split()))
length_2 = int(__input[2])
array_2 = list(map(int, __input[3].split()))

record = [False] * 2000


def solution():
    # print(length_1, array_1, length_2, array_2)
    assert length_1 == len(array_1) and length_2 == len(array_2)

    for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

    for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    solution() import sys sys __input = sys.stdin.readlines() __input sys.stdin.readlines() sys.stdin.readlines sys.stdin sys stdin readlines length_1 = int(__input[0]) length_1 int(__input[0]) int __input[0] __input 0 array_1 = list(map(int, __input[1].split())) array_1 list(map(int, __input[1].split())) list map(int, __input[1].split()) map int __input[1].split() [1].split [1] __input 1 split length_2 = int(__input[2]) length_2 int(__input[2]) int __input[2] __input 2 array_2 = list(map(int, __input[3].split())) array_2 list(map(int, __input[3].split())) list map(int, __input[3].split()) map int __input[3].split() [3].split [3] __input 3 split record = [False] * 2000 record [False] * 2000 [False] False 2000 def solution():
    # print(length_1, array_1, length_2, array_2)
    assert length_1 == len(array_1) and length_2 == len(array_2)

    for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

    for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no") solution assert length_1 == len(array_1) and length_2 == len(array_2) length_1 == len(array_1) and length_2 == len(array_2) length_1 == len(array_1) length_1 len(array_1) len array_1 length_2 == len(array_2) length_2 len(array_2) len array_2 for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

     i array_1 for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
         j range(2000 - i, 0, -1) range 2000 - i 2000 i 0 -1 if record[j]:
                # print(j, i + j)
                record[i + j] = True
         record[j] record j record[i + j] = True record[i + j] record i + j i j True record[i] = True record[i] record i True for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no") index array_2 if record[index]:
            print("yes")
        else:
            print("no") record[index] record index print("yes") print "yes" print("no") print "no" if __name__ == '__main__':
    solution() __name__ == '__main__' __name__ '__main__' solution() solution def solution():
    # print(length_1, array_1, length_2, array_2)
    assert length_1 == len(array_1) and length_2 == len(array_2)

    for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

    for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no") def solution():
    # print(length_1, array_1, length_2, array_2)
    assert length_1 == len(array_1) and length_2 == len(array_2)

    for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

    for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no") solution length_1 = int(__input[0]) int(__input[0]) length_1 length_2 = int(__input[2]) int(__input[2]) length_2 record = [False] * 2000 [False] * 2000 record array_1 = list(map(int, __input[1].split())) list(map(int, __input[1].split())) array_1 array_2 = list(map(int, __input[3].split())) list(map(int, __input[3].split())) array_2
# encoding: utf-8


import sys

__input = sys.stdin.readlines()
length_1 = int(__input[0])
array_1 = list(map(int, __input[1].split()))
length_2 = int(__input[2])
array_2 = list(map(int, __input[3].split()))

record = [False] * 2000


def solution():
    # print(length_1, array_1, length_2, array_2)
    assert length_1 == len(array_1) and length_2 == len(array_2)

    for i in array_1:
        # record[i] = True
        for j in range(2000 - i, 0, -1):
            if record[j]:
                # print(j, i + j)
                record[i + j] = True
        record[i] = True

    for index in array_2:
        if record[index]:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    solution()