N = int(input())
A = list(map(int, input().split()))
M_DICT = {}


def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res


def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main()
 N = int(input()) N int(input()) int input() input A = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split M_DICT = {} M_DICT {} def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res make_m if (i, m) in M_DICT:
        return M_DICT[(i, m)]
     (i, m) in M_DICT (i, m) i m M_DICT return M_DICT[(i, m)] M_DICT[(i, m)] M_DICT (i, m) i m if m == 0:
        return True
     m == 0 m 0 return True True if i >= N or m < 0:
        return False

     i >= N or m < 0 i >= N i N m < 0 m 0 return False False res = make_m(i+1, m) or make_m(i+1, m-A[i]) res make_m(i+1, m) or make_m(i+1, m-A[i]) make_m(i+1, m) make_m i+1 i 1 m make_m(i+1, m-A[i]) make_m i+1 i 1 m-A[i] m A[i] A i M_DICT[(i, m)] = res M_DICT[(i, m)] M_DICT (i, m) i m res return res res i i m m def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no") main q = int(input()) q int(input()) int input() input m_lst = list(map(int, input().split())) m_lst list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no") i range(q) range q if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no") make_m(0, m_lst[i]) make_m 0 m_lst[i] m_lst i print("yes") print "yes" print("no") print "no" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main A = list(map(int, input().split())) list(map(int, input().split())) A def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res make_m N = int(input()) int(input()) N def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no") def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no") main M_DICT = {} {} M_DICT
N = int(input())
A = list(map(int, input().split()))
M_DICT = {}


def make_m(i, m):
    if (i, m) in M_DICT:
        return M_DICT[(i, m)]
    if m == 0:
        return True
    if i >= N or m < 0:
        return False

    res = make_m(i+1, m) or make_m(i+1, m-A[i])
    M_DICT[(i, m)] = res
    return res


def main():
    q = int(input())
    m_lst = list(map(int, input().split()))

    for i in range(q):
        if make_m(0, m_lst[i]):
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main()

