class MyClass():

    def main(self):

        self.n = eval(input())

        self.A = list(map(int,input().split()))

        self.q = eval(input())

        self.M = list(map(int,input().split()))

        

        W = list(map(self.solve,self.M))

        for w in W:

            print(w)



    def solve(self,m):

        w = self.rec(m,self.A)

        if w:

            return "yes"

        else:

            return "no"



    def rec(self,m,A):

        if len(A) == 1:

            r1 = False

        else:

            r1 = self.rec(m,A[1:])



        m_new = m - A[0]

        if m_new == 0:

            r2 = True

        elif len(A) > 1 and min(A[1:]) <= m_new <= sum(A[1:]):

            r2 = self.rec(m_new,A[1:])

        else:

            r2 = False



        if r1 or r2:

            return True

        else:

            return False



if __name__ == "__main__":

    MC = MyClass()

    MC.main()
from collections import deque



def main():

    n = eval(input())

    A = deque(list(map(int,input().split())))

    q = eval(input())

    M = list(map(int,input().split()))



    p = rec([0],A)



    for m in M:

        if m in p:

            print("yes")

        else:

            print("no")



def rec(a,A):

    if len(A) == 0:

        return a

    else:

        y = A.popleft()

        a = a+[x+y for x in a]

        return rec(a,A)



if __name__ == "__main__":

    main()
class MyClass:
    def main(self):
        self.n = eval(input())
        self.A = list(map(int, input().split()))
        self.q = eval(input())
        self.M = list(map(int, input().split()))
        W = list(map(self.solve, self.M))
        for w in W:
            print(w)

    def solve(self, m):
        w = self.rec(m, self.A)
        if w:
            return "yes"
        else:
            return "no"

    def rec(self, m, A):
        if len(A) == 1:
            r1 = False
        else:
            r1 = self.rec(m, A[1:])
        m_new = m - A[0]
        if m_new == 0:
            r2 = True
        elif len(A) > 1 and min(A[1:]) <= m_new <= sum(A[1:]):
            r2 = self.rec(m_new, A[1:])
        else:
            r2 = False
        if r1 or r2:
            return True
        else:
            return False


if __name__ == "__main__":
    MC = MyClass()
    MC.main()

from collections import deque


def main():
    n = eval(input())
    A = deque(list(map(int, input().split())))
    q = eval(input())
    M = list(map(int, input().split()))
    p = rec([0], A)
    for m in M:
        if m in p:
            print("yes")
        else:
            print("no")


def rec(a, A):
    if len(A) == 0:
        return a
    else:
        y = A.popleft()
        a = a + [x + y for x in a]
        return rec(a, A)


if __name__ == "__main__":
    main()

-class MyClass: -    def main(self): -        self.n = eval(input()) -        self.A = list(map(int, input().split())) -        self.q = eval(input()) -        self.M = list(map(int, input().split())) -        W = list(map(self.solve, self.M)) -        for w in W: -            print(w) +from collections import deque -    def solve(self, m): -        w = self.rec(m, self.A) -        if w: -            return "yes" + +def main(): +    n = eval(input()) +    A = deque(list(map(int, input().split()))) +    q = eval(input()) +    M = list(map(int, input().split())) +    p = rec([0], A) +    for m in M: +        if m in p: +            print("yes") -            return "no" +            print("no") -    def rec(self, m, A): -        if len(A) == 1: -            r1 = False -        else: -            r1 = self.rec(m, A[1:]) -        m_new = m - A[0] -        if m_new == 0: -            r2 = True -        elif len(A) > 1 and min(A[1:]) <= m_new <= sum(A[1:]): -            r2 = self.rec(m_new, A[1:]) -        else: -            r2 = False -        if r1 or r2: -            return True -        else: -            return False + +def rec(a, A): +    if len(A) == 0: +        return a +    else: +        y = A.popleft() +        a = a + [x + y for x in a] +        return rec(a, A) -    MC = MyClass() -    MC.main() +    main()