def solve(n, A, q, m):
    memo = dict()
    for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

    for val in m:
        print("yes" if val in memo else "no")

if __name__ == "__main__":
    n = int(input())
    A = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))
    solve(n, A, q, m)
 def solve(n, A, q, m):
    memo = dict()
    for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

    for val in m:
        print("yes" if val in memo else "no") solve memo = dict() memo dict() dict for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

     i range(2**n) range 2**n 2 n tmp = 0 tmp 0 for j in range(n):
            if i >> j & 1:
                tmp += A[j]
         j range(n) range n if i >> j & 1:
                tmp += A[j]
         i >> j & 1 i >> j i j 1 tmp += A[j] tmp A[j] A j memo[tmp] = 1 memo[tmp] memo tmp 1 for val in m:
        print("yes" if val in memo else "no") val m print("yes" if val in memo else "no") print "yes" if val in memo else "no" val in memo val memo "yes" "no" n n A A q q m m if __name__ == "__main__":
    n = int(input())
    A = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))
    solve(n, A, q, m) __name__ == "__main__" __name__ "__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 solve(n, A, q, m) solve n A q m def solve(n, A, q, m):
    memo = dict()
    for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

    for val in m:
        print("yes" if val in memo else "no") def solve(n, A, q, m):
    memo = dict()
    for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

    for val in m:
        print("yes" if val in memo else "no") solve A = list(map(int, input().split())) list(map(int, input().split())) A m = list(map(int, input().split())) list(map(int, input().split())) m q = int(input()) int(input()) q n = int(input()) int(input()) n
def solve(n, A, q, m):
    memo = dict()
    for i in range(2**n):
        tmp = 0
        for j in range(n):
            if i >> j & 1:
                tmp += A[j]
        memo[tmp] = 1

    for val in m:
        print("yes" if val in memo else "no")

if __name__ == "__main__":
    n = int(input())
    A = list(map(int, input().split()))
    q = int(input())
    m = list(map(int, input().split()))
    solve(n, A, q, m)

