# -*- coding: utf-8 -*-





def check_solvable_recursively(number, is_solvable, candidate_numbers):

    """exhaustively search representable as summation of numbers in candidate_numbers



    Args:

        number: representable number

        is_solvable: is solvable list

        candidate_numbers: candidate numbers to be used



    Returns:

        None

    """

    if not is_solvable[number]:

        is_solvable[number] = True

    if candidate_numbers:

        check_solvable_recursively(number + candidate_numbers[0], is_solvable, candidate_numbers[1:])

        check_solvable_recursively(number, is_solvable, candidate_numbers[1:])





def main():

    input()  # pass length

    candidate_numbers = [int(x) for x in input().strip().split(' ')]

    input()  # pass length

    target_number_list = [int(x) for x in input().strip().split(' ')]



    is_solvable_list = [False] * 2001



    check_solvable_recursively(0, is_solvable_list, candidate_numbers)



    for target_number in target_number_list:

        if is_solvable_list[target_number]:

            print("yes")

        else:

            print("no")



if __name__ == "__main__":

    main()
# -*- coding: utf-8 -*-





def main():

    input()  # pass length

    candidate_number_list = [int(x) for x in input().strip().split(' ')]

    input()  # pass length

    target_number_list = [int(x) for x in input().strip().split(' ')]



    representable_number_set = {0}

    for candidate_number in candidate_number_list:

        for num in representable_number_set.copy():

            representable_number_set.add(num + candidate_number)



    for target_number in target_number_list:

        if target_number in representable_number_set:

            print("yes")

        else:

            print("no")



if __name__ == "__main__":

    main()
# -*- coding: utf-8 -*-
def check_solvable_recursively(number, is_solvable, candidate_numbers):
    """exhaustively search representable as summation of numbers in candidate_numbers
    Args:
        number: representable number
        is_solvable: is solvable list
        candidate_numbers: candidate numbers to be used
    Returns:
        None
    """
    if not is_solvable[number]:
        is_solvable[number] = True
    if candidate_numbers:
        check_solvable_recursively(
            number + candidate_numbers[0], is_solvable, candidate_numbers[1:]
        )
        check_solvable_recursively(number, is_solvable, candidate_numbers[1:])


def main():
    input()  # pass length
    candidate_numbers = [int(x) for x in input().strip().split(" ")]
    input()  # pass length
    target_number_list = [int(x) for x in input().strip().split(" ")]
    is_solvable_list = [False] * 2001
    check_solvable_recursively(0, is_solvable_list, candidate_numbers)
    for target_number in target_number_list:
        if is_solvable_list[target_number]:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    main()

# -*- coding: utf-8 -*-
def main():
    input()  # pass length
    candidate_number_list = [int(x) for x in input().strip().split(" ")]
    input()  # pass length
    target_number_list = [int(x) for x in input().strip().split(" ")]
    representable_number_set = {0}
    for candidate_number in candidate_number_list:
        for num in representable_number_set.copy():
            representable_number_set.add(num + candidate_number)
    for target_number in target_number_list:
        if target_number in representable_number_set:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    main()

-def check_solvable_recursively(number, is_solvable, candidate_numbers): -    """exhaustively search representable as summation of numbers in candidate_numbers -    Args: -        number: representable number -        is_solvable: is solvable list -        candidate_numbers: candidate numbers to be used -    Returns: -        None -    """ -    if not is_solvable[number]: -        is_solvable[number] = True -    if candidate_numbers: -        check_solvable_recursively( -            number + candidate_numbers[0], is_solvable, candidate_numbers[1:] -        ) -        check_solvable_recursively(number, is_solvable, candidate_numbers[1:]) - - -    candidate_numbers = [int(x) for x in input().strip().split(" ")] +    candidate_number_list = [int(x) for x in input().strip().split(" ")] -    is_solvable_list = [False] * 2001 -    check_solvable_recursively(0, is_solvable_list, candidate_numbers) +    representable_number_set = {0} +    for candidate_number in candidate_number_list: +        for num in representable_number_set.copy(): +            representable_number_set.add(num + candidate_number) -        if is_solvable_list[target_number]: +        if target_number in representable_number_set: