def solve(i, m):

    if i >= n:
        combs.add(m)
        return

    solve(i+1, m)
    solve(i+1, m+A[i])


def main():
    global n
    global A
    global combs
    n = int(input())
    A = list(map(int, input().split()))
    _ = int(input())
    Q = list(map(int, input().split()))
    # 先に全部の組み合わせを計算しておくことで時間短縮
    combs = set()
    solve(0, 0)

    for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main() def solve(i, m):

    if i >= n:
        combs.add(m)
        return

    solve(i+1, m)
    solve(i+1, m+A[i]) solve if i >= n:
        combs.add(m)
        return

     i >= n i n combs.add(m) combs.add combs add m return solve(i+1, m) solve i+1 i 1 m solve(i+1, m+A[i]) solve i+1 i 1 m+A[i] m A[i] A i i i m m def main():
    global n
    global A
    global combs
    n = int(input())
    A = list(map(int, input().split()))
    _ = int(input())
    Q = list(map(int, input().split()))
    # 先に全部の組み合わせを計算しておくことで時間短縮
    combs = set()
    solve(0, 0)

    for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no") main global n global A global combs 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 _ = int(input()) _ int(input()) int input() input Q = list(map(int, input().split())) Q list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split combs = set() combs set() set solve(0, 0) solve 0 0 for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no") q Q if q in combs:
            print("yes")
        else:
            print("no") q in combs q combs print("yes") print "yes" print("no") print "no" if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def solve(i, m):

    if i >= n:
        combs.add(m)
        return

    solve(i+1, m)
    solve(i+1, m+A[i]) def solve(i, m):

    if i >= n:
        combs.add(m)
        return

    solve(i+1, m)
    solve(i+1, m+A[i]) solve def main():
    global n
    global A
    global combs
    n = int(input())
    A = list(map(int, input().split()))
    _ = int(input())
    Q = list(map(int, input().split()))
    # 先に全部の組み合わせを計算しておくことで時間短縮
    combs = set()
    solve(0, 0)

    for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no") def main():
    global n
    global A
    global combs
    n = int(input())
    A = list(map(int, input().split()))
    _ = int(input())
    Q = list(map(int, input().split()))
    # 先に全部の組み合わせを計算しておくことで時間短縮
    combs = set()
    solve(0, 0)

    for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no") main
def solve(i, m):

    if i >= n:
        combs.add(m)
        return

    solve(i+1, m)
    solve(i+1, m+A[i])


def main():
    global n
    global A
    global combs
    n = int(input())
    A = list(map(int, input().split()))
    _ = int(input())
    Q = list(map(int, input().split()))
    # 先に全部の組み合わせを計算しておくことで時間短縮
    combs = set()
    solve(0, 0)

    for q in Q:
        if q in combs:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    main()
