def resolve():
    n = int(input())
    A = [int(i) for i in input().split()]
    ans = [False] * 2001
    for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
    q = int(input())
    M = [int(i) for i in input().split()]
    for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no")


resolve()
 def resolve():
    n = int(input())
    A = [int(i) for i in input().split()]
    ans = [False] * 2001
    for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
    q = int(input())
    M = [int(i) for i in input().split()]
    for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no") resolve n = int(input()) n int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i A = [int(i) for i in input().split()] A [int(i) for i in input().split()] ans = [False] * 2001 ans [False] * 2001 [False] False 2001 for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
     i range(2**n) range 2**n 2 n sumA = 0 sumA 0 for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
         j range(n) range n if (i >> j) & 1:
                sumA += A[j]
         (i >> j) & 1 i >> j i j 1 sumA += A[j] sumA A[j] A j ans[sumA] = True ans[sumA] ans sumA True q = int(input()) q int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i M = [int(i) for i in input().split()] M [int(i) for i in input().split()] for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no") m M if ans[m]:
            print("yes")
        else:
            print("no") ans[m] ans m print("yes") print "yes" print("no") print "no" resolve() resolve def resolve():
    n = int(input())
    A = [int(i) for i in input().split()]
    ans = [False] * 2001
    for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
    q = int(input())
    M = [int(i) for i in input().split()]
    for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no") def resolve():
    n = int(input())
    A = [int(i) for i in input().split()]
    ans = [False] * 2001
    for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
    q = int(input())
    M = [int(i) for i in input().split()]
    for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no") resolve
def resolve():
    n = int(input())
    A = [int(i) for i in input().split()]
    ans = [False] * 2001
    for i in range(2**n):
        sumA = 0
        for j in range(n):
            if (i >> j) & 1:
                sumA += A[j]
        ans[sumA] = True
    q = int(input())
    M = [int(i) for i in input().split()]
    for m in M:
        if ans[m]:
            print("yes")
        else:
            print("no")


resolve()

