def part_sum(a,A):
    #初期化
    N=len(a)
    dp=[[-1 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=[]
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
    """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """
    return dp[N][A]
a = int(input())
num = list(map(int,input().split()))
q = int(input())
ans = list(map(int,input().split()))
for i in ans:
    check = part_sum(num,i)
    #print(check)
    if check == -1:
        print("no")
    else:
        print("yes") def part_sum(a,A):
    #初期化
    N=len(a)
    dp=[[-1 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=[]
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
    """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """
    return dp[N][A] part_sum N=len(a) N len(a) len a [-1 for i in range(A+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) [-1 for i in range(A+1)] dp=[[-1 for i in range(A+1)] for j in range(N+1)] dp [[-1 for i in range(A+1)] for j in range(N+1)] dp[0][0]=[] dp[0][0] [0] dp 0 0 [] for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
     i range(N) range N for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
     j range(A+1) range A+1 A 1 if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
     a[i]<=j a[i] a i j if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
             dp[i][j] != -1 dp[i][j] [i] dp i j -1 dp[i+1][j] = dp[i][j] dp[i+1][j] [i+1] dp i+1 i 1 j dp[i][j] [i] dp i j elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
             dp[i][j-a[i]] != -1 dp[i][j-a[i]] [i] dp i j-a[i] j a[i] a i -1 dp[i+1][j] = dp[i][j-a[i]]+[a[i]] dp[i+1][j] [i+1] dp i+1 i 1 j dp[i][j-a[i]]+[a[i]] dp[i][j-a[i]] [i] dp i j-a[i] j a[i] a i [a[i]] a[i] a i dp[i+1][j]=dp[i][j] dp[i+1][j] [i+1] dp i+1 i 1 j dp[i][j] [i] dp i j """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """ return dp[N][A] dp[N][A] [N] dp N A a a A A a = int(input()) a int(input()) int input() input num = list(map(int,input().split())) num 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 ans = list(map(int,input().split())) ans list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split for i in ans:
    check = part_sum(num,i)
    #print(check)
    if check == -1:
        print("no")
    else:
        print("yes") i ans check = part_sum(num,i) check part_sum(num,i) part_sum num i if check == -1:
        print("no")
    else:
        print("yes") check == -1 check -1 print("no") print "no" print("yes") print "yes" check = part_sum(num,i) part_sum(num,i) check def part_sum(a,A):
    #初期化
    N=len(a)
    dp=[[-1 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=[]
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
    """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """
    return dp[N][A] def part_sum(a,A):
    #初期化
    N=len(a)
    dp=[[-1 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=[]
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
    """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """
    return dp[N][A] part_sum q = int(input()) int(input()) q ans = list(map(int,input().split())) list(map(int,input().split())) ans num = list(map(int,input().split())) list(map(int,input().split())) num a = int(input()) int(input()) a
def part_sum(a,A):
    #初期化
    N=len(a)
    dp=[[-1 for i in range(A+1)] for j in range(N+1)]
    dp[0][0]=[]
    #DP
    for i in range(N):
        for j in range(A+1):
            if a[i]<=j: #i+1番目の数字a[i]を足せるかも
                if dp[i][j] != -1:
                    dp[i+1][j] = dp[i][j]
                elif dp[i][j-a[i]] != -1:
                    dp[i+1][j] = dp[i][j-a[i]]+[a[i]]
            else: #入る可能性はない
                dp[i+1][j]=dp[i][j]
    #生成可能な自然数の配列(辞書型)
    """
    num_list = {}
    for i in dp:
        for num,j in enumerate(i):
            if j != -1:
                num_list[num] = j
    return num_list
    """
    return dp[N][A]
a = int(input())
num = list(map(int,input().split()))
q = int(input())
ans = list(map(int,input().split()))
for i in ans:
    check = part_sum(num,i)
    #print(check)
    if check == -1:
        print("no")
    else:
        print("yes")
