# -*- coding: utf-8 -*-
"""

"""
from itertools import combinations

if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    M = [int(x) for x in input().split(' ')]
    num2 = int(input())
    A = [int(x) for x in input().split(' ')]
    #A = [1, 5, 7, 10, 21]
    #pick = 4
    #M = [2, 4, 17, 8]

    # ????????????
    results = ['no' for x in range(len(A))]

    for p in range(1, len(M)+1):
        combi = combinations(M, p)
        for choice in combi:
            total = sum(choice)
            if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
    for txt in results:
        print(txt) """

""" from itertools import combinations if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    M = [int(x) for x in input().split(' ')]
    num2 = int(input())
    A = [int(x) for x in input().split(' ')]
    #A = [1, 5, 7, 10, 21]
    #pick = 4
    #M = [2, 4, 17, 8]

    # ????????????
    results = ['no' for x in range(len(A))]

    for p in range(1, len(M)+1):
        combi = combinations(M, p)
        for choice in combi:
            total = sum(choice)
            if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
    for txt in results:
        print(txt) __name__ == '__main__' __name__ '__main__' num1 = int(input()) num1 int(input()) int input() input int(x) for x in input().split(' ') for x in input().split(' ') x input().split(' ') ().split () input split ' ' for x in input().split(' ') int(x) int x M = [int(x) for x in input().split(' ')] M [int(x) for x in input().split(' ')] num2 = int(input()) num2 int(input()) int input() input int(x) for x in input().split(' ') for x in input().split(' ') x input().split(' ') ().split () input split ' ' for x in input().split(' ') int(x) int x A = [int(x) for x in input().split(' ')] A [int(x) for x in input().split(' ')] 'no' for x in range(len(A)) for x in range(len(A)) x range(len(A)) range len(A) len A for x in range(len(A)) 'no' results = ['no' for x in range(len(A))] results ['no' for x in range(len(A))] for p in range(1, len(M)+1):
        combi = combinations(M, p)
        for choice in combi:
            total = sum(choice)
            if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
     p range(1, len(M)+1) range 1 len(M)+1 len(M) len M 1 combi = combinations(M, p) combi combinations(M, p) combinations M p for choice in combi:
            total = sum(choice)
            if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
     choice combi total = sum(choice) total sum(choice) sum choice if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
     total in A total A while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
     total in A total A i = A.index(total) i A.index(total) A.index A index total results[i] = 'yes' results[i] results i 'yes' A[i] = 'Done' A[i] A i 'Done' for txt in results:
        print(txt) txt results print(txt) print txt M = [int(x) for x in input().split(' ')] [int(x) for x in input().split(' ')] M num1 = int(input()) int(input()) num1 A = [int(x) for x in input().split(' ')] [int(x) for x in input().split(' ')] A combi = combinations(M, p) combinations(M, p) combi i = A.index(total) A.index(total) i num2 = int(input()) int(input()) num2 results = ['no' for x in range(len(A))] ['no' for x in range(len(A))] results total = sum(choice) sum(choice) total
# -*- coding: utf-8 -*-
"""

"""
from itertools import combinations

if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    M = [int(x) for x in input().split(' ')]
    num2 = int(input())
    A = [int(x) for x in input().split(' ')]
    #A = [1, 5, 7, 10, 21]
    #pick = 4
    #M = [2, 4, 17, 8]

    # ????????????
    results = ['no' for x in range(len(A))]

    for p in range(1, len(M)+1):
        combi = combinations(M, p)
        for choice in combi:
            total = sum(choice)
            if total in A:
                while total in A:
                    i = A.index(total)
                    results[i] = 'yes'
                    A[i] = 'Done'

    # ???????????????
    for txt in results:
        print(txt)