class Solver():
    def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

    def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

    def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
            


if __name__ == '__main__':
    n = int(input())
    A = [int(i) for i in input().rstrip().split()]
    q = int(input())
    m_ary = [int(i) for i in input().rstrip().split()]
    s = Solver(A)
    for val in m_ary:
        print(s.solve(val)) class Solver():
    def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

    def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

    def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
             Solver def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

     __init__ self.A = A self.A self A A self.max_depth = len(A) self.max_depth self max_depth len(A) len A self self A: [int] A def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

     solve self.tgt = tgt self.tgt self tgt tgt self.history = (self.max_depth+1)*[4000 * [None]] self.history self history (self.max_depth+1)*[4000 * [None]] self.max_depth+1 self.max_depth self max_depth 1 [4000 * [None]] 4000 * [None] 4000 [None] None [None for i in range(4000)] for x in range(self.max_depth + 1) for x in range(self.max_depth + 1) x range(self.max_depth + 1) range self.max_depth + 1 self.max_depth self max_depth 1 for x in range(self.max_depth + 1) [None for i in range(4000)] self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)] self.history self history [[None for i in range(4000)] for x in range(self.max_depth + 1)] if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

     self._rec_solve(0, 0) self._rec_solve self _rec_solve 0 0 return 'yes' 'yes' return 'no' 'no' self self tgt tgt def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
             _rec_solve if self.history[index][_sum] is not None:
            return self.history[index][_sum]
         self.history[index][_sum] is not None self.history[index][_sum] self.history[index] self.history self history index _sum None return self.history[index][_sum] self.history[index][_sum] self.history[index] self.history self history index _sum if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
         _sum == self.tgt _sum self.tgt self tgt self.history[index][_sum] = True self.history[index][_sum] self.history[index] self.history self history index _sum True return True True if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
         index >= self.max_depth or _sum > self.tgt index >= self.max_depth index self.max_depth self max_depth _sum > self.tgt _sum self.tgt self tgt self.history[index][_sum] = False self.history[index][_sum] self.history[index] self.history self history index _sum False return False False self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1) self.history[index][_sum] self.history[index] self.history self history index _sum self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1) self._rec_solve(_sum + self.A[index], index + 1) self._rec_solve self _rec_solve _sum + self.A[index] _sum self.A[index] self.A self A index index + 1 index 1 self._rec_solve(_sum, index + 1) self._rec_solve self _rec_solve _sum index + 1 index 1 return self.history[index][_sum] self.history[index][_sum] self.history[index] self.history self history index _sum self self _sum _sum index index if __name__ == '__main__':
    n = int(input())
    A = [int(i) for i in input().rstrip().split()]
    q = int(input())
    m_ary = [int(i) for i in input().rstrip().split()]
    s = Solver(A)
    for val in m_ary:
        print(s.solve(val)) __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input int(i) for i in input().rstrip().split() for i in input().rstrip().split() i input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for i in input().rstrip().split() int(i) int i A = [int(i) for i in input().rstrip().split()] A [int(i) for i in input().rstrip().split()] q = int(input()) q int(input()) int input() input int(i) for i in input().rstrip().split() for i in input().rstrip().split() i input().rstrip().split() ().rstrip().split ().rstrip() ().rstrip () input rstrip split for i in input().rstrip().split() int(i) int i m_ary = [int(i) for i in input().rstrip().split()] m_ary [int(i) for i in input().rstrip().split()] s = Solver(A) s Solver(A) Solver A for val in m_ary:
        print(s.solve(val)) val m_ary print(s.solve(val)) print s.solve(val) s.solve s solve val n = int(input()) int(input()) n s = Solver(A) Solver(A) s class Solver():
    def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

    def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

    def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
             class Solver():
    def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

    def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

    def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
             Solver A = [int(i) for i in input().rstrip().split()] [int(i) for i in input().rstrip().split()] A q = int(input()) int(input()) q m_ary = [int(i) for i in input().rstrip().split()] [int(i) for i in input().rstrip().split()] m_ary
class Solver():
    def __init__(self, A: [int]):
        self.A = A
        self.max_depth = len(A)

    def solve(self, tgt):
        self.tgt = tgt
        self.history = (self.max_depth+1)*[4000 * [None]]
        self.history = [[None for i in range(4000)] for x in range(self.max_depth + 1)]
        if self._rec_solve(0, 0):
            return 'yes'
        else:
            return 'no'

    def _rec_solve(self, _sum, index):
        if self.history[index][_sum] is not None:
            return self.history[index][_sum]
        if _sum == self.tgt:
            self.history[index][_sum] = True
            return True
        if index >= self.max_depth or _sum > self.tgt:
            self.history[index][_sum] = False
            return False
        self.history[index][_sum] = self._rec_solve(_sum + self.A[index], index + 1) or self._rec_solve(_sum, index + 1)
        return self.history[index][_sum]
            


if __name__ == '__main__':
    n = int(input())
    A = [int(i) for i in input().rstrip().split()]
    q = int(input())
    m_ary = [int(i) for i in input().rstrip().split()]
    s = Solver(A)
    for val in m_ary:
        print(s.solve(val))