# -*- coding=utf-8 -*-
import itertools

count = int(input())
_list = list(map(int, input().split(" ")))

count2 = int(input())
_answers = list(map(int, input().split(" ")))

desc = []
checked = False

# answersの数だけloopして取ってくる
for answer in _answers:
    checked = False
    tmp = [i for i in _list if answer >= i]

    # そもそもtmpの中身をsumしてanswer未満ならば強制的にno
    if answer > sum(tmp):
        desc.append("no")

    # itertoolsのコンビネーションを使用して解く
    else:
        for i in range(len(tmp) + 1):
            if checked == True:
                break

            tmp2 = list(itertools.combinations(tmp, i))
            for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

        if checked != True:
            desc.append("no")

for i in desc:
    print(i)
 import itertools itertools count = int(input()) count int(input()) int input() input _list = list(map(int, input().split(" "))) _list list(map(int, input().split(" "))) list map(int, input().split(" ")) map int input().split(" ") ().split () input split " " count2 = int(input()) count2 int(input()) int input() input _answers = list(map(int, input().split(" "))) _answers list(map(int, input().split(" "))) list map(int, input().split(" ")) map int input().split(" ") ().split () input split " " desc = [] desc [] checked = False checked False for answer in _answers:
    checked = False
    tmp = [i for i in _list if answer >= i]

    # そもそもtmpの中身をsumしてanswer未満ならば強制的にno
    if answer > sum(tmp):
        desc.append("no")

    # itertoolsのコンビネーションを使用して解く
    else:
        for i in range(len(tmp) + 1):
            if checked == True:
                break

            tmp2 = list(itertools.combinations(tmp, i))
            for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

        if checked != True:
            desc.append("no") answer _answers checked = False checked False i for i in _list if answer >= i for i in _list if answer >= i i _list answer >= i answer i if answer >= i i tmp = [i for i in _list if answer >= i] tmp [i for i in _list if answer >= i] if answer > sum(tmp):
        desc.append("no")

    # itertoolsのコンビネーションを使用して解く
    else:
        for i in range(len(tmp) + 1):
            if checked == True:
                break

            tmp2 = list(itertools.combinations(tmp, i))
            for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

        if checked != True:
            desc.append("no") answer > sum(tmp) answer sum(tmp) sum tmp desc.append("no") desc.append desc append "no" for i in range(len(tmp) + 1):
            if checked == True:
                break

            tmp2 = list(itertools.combinations(tmp, i))
            for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

         i range(len(tmp) + 1) range len(tmp) + 1 len(tmp) len tmp 1 if checked == True:
                break

             checked == True checked True break tmp2 = list(itertools.combinations(tmp, i)) tmp2 list(itertools.combinations(tmp, i)) list itertools.combinations(tmp, i) itertools.combinations itertools combinations tmp i for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

         tmp3 tmp2 if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

         sum(tmp3) == answer sum(tmp3) sum tmp3 answer desc.append("yes") desc.append desc append "yes" checked = True checked True break if checked != True:
            desc.append("no") checked != True checked True desc.append("no") desc.append desc append "no" for i in desc:
    print(i) i desc print(i) print i checked = False False checked _answers = list(map(int, input().split(" "))) list(map(int, input().split(" "))) _answers tmp = [i for i in _list if answer >= i] [i for i in _list if answer >= i] tmp tmp2 = list(itertools.combinations(tmp, i)) list(itertools.combinations(tmp, i)) tmp2 count2 = int(input()) int(input()) count2 checked = False False checked count = int(input()) int(input()) count _list = list(map(int, input().split(" "))) list(map(int, input().split(" "))) _list desc = [] [] desc checked = True True checked
# -*- coding=utf-8 -*-
import itertools

count = int(input())
_list = list(map(int, input().split(" ")))

count2 = int(input())
_answers = list(map(int, input().split(" ")))

desc = []
checked = False

# answersの数だけloopして取ってくる
for answer in _answers:
    checked = False
    tmp = [i for i in _list if answer >= i]

    # そもそもtmpの中身をsumしてanswer未満ならば強制的にno
    if answer > sum(tmp):
        desc.append("no")

    # itertoolsのコンビネーションを使用して解く
    else:
        for i in range(len(tmp) + 1):
            if checked == True:
                break

            tmp2 = list(itertools.combinations(tmp, i))
            for tmp3 in tmp2:
                if sum(tmp3) == answer:
                    desc.append("yes")
                    checked = True
                    break

        if checked != True:
            desc.append("no")

for i in desc:
    print(i)

