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


def main():
    raw_input()  # pass length
    candidate_number_list = [int(x) for x in raw_input().strip().split(' ')]
    raw_input()  # pass length
    target_number_list = [int(x) for x in raw_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 main():
    raw_input()  # pass length
    candidate_number_list = [int(x) for x in raw_input().strip().split(' ')]
    raw_input()  # pass length
    target_number_list = [int(x) for x in raw_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" main raw_input() raw_input int(x) for x in raw_input().strip().split(' ') for x in raw_input().strip().split(' ') x raw_input().strip().split(' ') ().strip().split ().strip() ().strip () raw_input strip split ' ' for x in raw_input().strip().split(' ') int(x) int x candidate_number_list = [int(x) for x in raw_input().strip().split(' ')] candidate_number_list [int(x) for x in raw_input().strip().split(' ')] raw_input() raw_input int(x) for x in raw_input().strip().split(' ') for x in raw_input().strip().split(' ') x raw_input().strip().split(' ') ().strip().split ().strip() ().strip () raw_input strip split ' ' for x in raw_input().strip().split(' ') int(x) int x target_number_list = [int(x) for x in raw_input().strip().split(' ')] target_number_list [int(x) for x in raw_input().strip().split(' ')] representable_number_set = {0} 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)

     candidate_number candidate_number_list for num in representable_number_set.copy():
            representable_number_set.add(num + candidate_number)

     num representable_number_set.copy() representable_number_set.copy representable_number_set copy representable_number_set.add(num + candidate_number) representable_number_set.add representable_number_set add num + candidate_number num candidate_number for target_number in target_number_list:
        if target_number in representable_number_set:
            print "yes"
        else:
            print "no" target_number target_number_list if target_number in representable_number_set:
            print "yes"
        else:
            print "no" target_number in representable_number_set target_number representable_number_set print print if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    raw_input()  # pass length
    candidate_number_list = [int(x) for x in raw_input().strip().split(' ')]
    raw_input()  # pass length
    target_number_list = [int(x) for x in raw_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" def main():
    raw_input()  # pass length
    candidate_number_list = [int(x) for x in raw_input().strip().split(' ')]
    raw_input()  # pass length
    target_number_list = [int(x) for x in raw_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" main
# -*- coding: utf-8 -*-


def main():
    raw_input()  # pass length
    candidate_number_list = [int(x) for x in raw_input().strip().split(' ')]
    raw_input()  # pass length
    target_number_list = [int(x) for x in raw_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()