import sys


input = sys.stdin.readline


def make_sum_set(i, v):
    if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i])


def main():
    make_sum_set(0, 0)
    for m in M:
        if m in S:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    N = int(input())
    A = [int(a) for a in input().split()]
    Q = int(input())
    M = [int(m) for m in input().split()]
    S = set()
    main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def make_sum_set(i, v):
    if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i]) make_sum_set if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i]) i == N i N S.add(v) S.add S add v return make_sum_set(i+1, v) make_sum_set i+1 i 1 v make_sum_set(i+1, v+A[i]) make_sum_set i+1 i 1 v+A[i] v A[i] A i i i v v def main():
    make_sum_set(0, 0)
    for m in M:
        if m in S:
            print("yes")
        else:
            print("no") main make_sum_set(0, 0) make_sum_set 0 0 for m in M:
        if m in S:
            print("yes")
        else:
            print("no") m M if m in S:
            print("yes")
        else:
            print("no") m in S m S print("yes") print "yes" print("no") print "no" if __name__ == "__main__":
    N = int(input())
    A = [int(a) for a in input().split()]
    Q = int(input())
    M = [int(m) for m in input().split()]
    S = set()
    main() __name__ == "__main__" __name__ "__main__" N = int(input()) N int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] Q = int(input()) Q int(input()) int input() input int(m) for m in input().split() for m in input().split() m input().split() ().split () input split for m in input().split() int(m) int m M = [int(m) for m in input().split()] M [int(m) for m in input().split()] S = set() S set() set main() main Q = int(input()) int(input()) Q N = int(input()) int(input()) N A = [int(a) for a in input().split()] [int(a) for a in input().split()] A def main():
    make_sum_set(0, 0)
    for m in M:
        if m in S:
            print("yes")
        else:
            print("no") def main():
    make_sum_set(0, 0)
    for m in M:
        if m in S:
            print("yes")
        else:
            print("no") main S = set() set() S input = sys.stdin.readline sys.stdin.readline input M = [int(m) for m in input().split()] [int(m) for m in input().split()] M def make_sum_set(i, v):
    if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i]) def make_sum_set(i, v):
    if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i]) make_sum_set
import sys


input = sys.stdin.readline


def make_sum_set(i, v):
    if i == N:
        S.add(v)
        return
    else:
        make_sum_set(i+1, v)
        make_sum_set(i+1, v+A[i])


def main():
    make_sum_set(0, 0)
    for m in M:
        if m in S:
            print("yes")
        else:
            print("no")


if __name__ == "__main__":
    N = int(input())
    A = [int(a) for a in input().split()]
    Q = int(input())
    M = [int(m) for m in input().split()]
    S = set()
    main()
