from itertools import combinations

if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    A = [int(x) for x in input().split(' ')]
    num2 = int(input())
    M = [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(M))]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨????????????

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

    # ???????????????
    for txt in results:
        print(txt) from itertools import combinations if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    A = [int(x) for x in input().split(' ')]
    num2 = int(input())
    M = [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(M))]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨????????????

    for p in range(1, len(A)+1):  # A????????????1????????¨????????°?????????????????¢????????????
        combi = combinations(A, p)  # n??????????????¢??????????????´????????¨?????????????????????
        for choice in combi:
            total = sum(choice)
            while total in M:
                i = M.index(total)
                results[i] = 'yes'
                M[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 A = [int(x) for x in input().split(' ')] A [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 M = [int(x) for x in input().split(' ')] M [int(x) for x in input().split(' ')] 'no' for x in range(len(M)) for x in range(len(M)) x range(len(M)) range len(M) len M for x in range(len(M)) 'no' results = ['no' for x in range(len(M))] results ['no' for x in range(len(M))] for p in range(1, len(A)+1):  # A????????????1????????¨????????°?????????????????¢????????????
        combi = combinations(A, p)  # n??????????????¢??????????????´????????¨?????????????????????
        for choice in combi:
            total = sum(choice)
            while total in M:
                i = M.index(total)
                results[i] = 'yes'
                M[i] = 'Done'

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

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

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

if __name__ == '__main__':
    # ??????????????\???
    num1 = int(input())
    A = [int(x) for x in input().split(' ')]
    num2 = int(input())
    M = [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(M))]  # M?????¨??????????´?????????????????????????????????§????????????????????±???(no)??¨????????????

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

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