def solve_knapsack_problem(A,n,m):
    a=[[0 for i in range(m+1)]for j in range(n+1)]
    for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
    return False

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

    for i in range(q):
        if solve_knapsack_problem(A,n,m[i]):
            print("yes")
        else:
            print("no")
                    
 def solve_knapsack_problem(A,n,m):
    a=[[0 for i in range(m+1)]for j in range(n+1)]
    for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
    return False solve_knapsack_problem [0 for i in range(m+1)]for j in range(n+1) for j in range(n+1) j range(n+1) range n+1 n 1 for j in range(n+1) [0 for i in range(m+1)] a=[[0 for i in range(m+1)]for j in range(n+1)] a [[0 for i in range(m+1)]for j in range(n+1)] for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
     i range(1,n+1) range 1 n+1 n 1 for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
     j range(1,m+1) range 1 m+1 m 1 if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
             A[i-1]<=j A[i-1] A i-1 i 1 j a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j]) a[i][j] [i] a i j max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j]) max a[i-1][j-A[i-1]]+A[i-1] a[i-1][j-A[i-1]] [i-1] a i-1 i 1 j-A[i-1] j A[i-1] A i-1 i 1 A[i-1] A i-1 i 1 a[i-1][j] [i-1] a i-1 i 1 j a[i][j] = a[i-1][j] a[i][j] [i] a i j a[i-1][j] [i-1] a i-1 i 1 j if a[i][j] == m:
                return True
     a[i][j] == m a[i][j] [i] a i j m return True True return False False A A n n m m if __name__ == "__main__":
    n=int(input())
    A=list(map(int,input().split()))
    q=int(input())
    m=list(map(int,input().split()))
    result=[]

    for i in range(q):
        if solve_knapsack_problem(A,n,m[i]):
            print("yes")
        else:
            print("no")
                     __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 result=[] result [] for i in range(q):
        if solve_knapsack_problem(A,n,m[i]):
            print("yes")
        else:
            print("no")
                     i range(q) range q if solve_knapsack_problem(A,n,m[i]):
            print("yes")
        else:
            print("no")
                     solve_knapsack_problem(A,n,m[i]) solve_knapsack_problem A n m[i] m i print("yes") print "yes" print("no") print "no" n=int(input()) int(input()) n A=list(map(int,input().split())) list(map(int,input().split())) A q=int(input()) int(input()) q def solve_knapsack_problem(A,n,m):
    a=[[0 for i in range(m+1)]for j in range(n+1)]
    for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
    return False def solve_knapsack_problem(A,n,m):
    a=[[0 for i in range(m+1)]for j in range(n+1)]
    for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
    return False solve_knapsack_problem result=[] [] result m=list(map(int,input().split())) list(map(int,input().split())) m
def solve_knapsack_problem(A,n,m):
    a=[[0 for i in range(m+1)]for j in range(n+1)]
    for i in range(1,n+1):
        for j in range(1,m+1):
            if A[i-1]<=j:
                a[i][j] = max(a[i-1][j-A[i-1]]+A[i-1],a[i-1][j])
            else:
               a[i][j] = a[i-1][j]
            
            if a[i][j] == m:
                return True
    return False

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

    for i in range(q):
        if solve_knapsack_problem(A,n,m[i]):
            print("yes")
        else:
            print("no")
                    

