def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))

    res = list()

    def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
    def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
    dfs([])
    for i in m:
        if i in res:
            print('yes')
        else:
            print('no')

if __name__ == '__main__':
    main() def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))

    res = list()

    def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
    def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
    dfs([])
    for i in m:
        if i in res:
            print('yes')
        else:
            print('no') 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 q = int(input()) q int(input()) int input() input m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split res = list() res list() list def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
     mul return a * b a * b a b a a b b def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
     dfs if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
         len(A) == n len(A) len A n res.append(sum(list(map(mul, a, A)))) res.append res append sum(list(map(mul, a, A))) sum list(map(mul, a, A)) list map(mul, a, A) map mul a A return for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
     v range(2) range 2 A.append(v) A.append A append v dfs(A) dfs A A.pop() A.pop A pop A A dfs([]) dfs [] for i in m:
        if i in res:
            print('yes')
        else:
            print('no') i m if i in res:
            print('yes')
        else:
            print('no') i in res i res print('yes') print 'yes' print('no') print 'no' if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))

    res = list()

    def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
    def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
    dfs([])
    for i in m:
        if i in res:
            print('yes')
        else:
            print('no') def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))

    res = list()

    def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
    def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
    dfs([])
    for i in m:
        if i in res:
            print('yes')
        else:
            print('no') main
def main():
    n = int(input())
    a = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))

    res = list()

    def mul(a, b):
        return a * b

#   # bit探索
    # for i in range(2**n):
    #     x = [0] * n
    #     for j in range(n):
    #         if(i >> j) & 1:
    #             x[j] = 1
    #     res.append(sum(list(map(mul, a, x))))
    # for i in m:
    #     if i in res:
    #         print('yes')
    #     else:
    #         print('no')
#   # 再帰
    def dfs(A):
        # 終端条件 --- nループまで回したら処理して打ち切り
        if len(A) == n:
            # print(A)
            res.append(sum(list(map(mul, a, A))))
            return
        for v in range(2):
            A.append(v)
            dfs(A)
            A.pop()
    dfs([])
    for i in m:
        if i in res:
            print('yes')
        else:
            print('no')

if __name__ == '__main__':
    main()
