N = int(input())
A = list(map(int, input().split()))
Q = int(input())
m = list(map(int, input().split()))
memo = [[-1]*2000 for _ in range(20)]
def solve(i, m):
    if memo[i][m] != -1:
        return memo[i][m]
    if m == 0:
        memo[i][m] = 1
        return True
    if m < 0:
        memo[i][m] = 0
        return False
    if i >= N:
        memo[i][m] = 0
        return False
    if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
    res = solve(i+1, m) or solve(i+1, m-A[i])
    memo[i][m] = res
    return res
for mi in m:
    if solve(0, mi):
        print("yes")
    else:
        print("no") 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 [-1]*2000 for _ in range(20) for _ in range(20) _ range(20) range 20 for _ in range(20) [-1]*2000 [-1] -1 2000 memo = [[-1]*2000 for _ in range(20)] memo [[-1]*2000 for _ in range(20)] def solve(i, m):
    if memo[i][m] != -1:
        return memo[i][m]
    if m == 0:
        memo[i][m] = 1
        return True
    if m < 0:
        memo[i][m] = 0
        return False
    if i >= N:
        memo[i][m] = 0
        return False
    if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
    res = solve(i+1, m) or solve(i+1, m-A[i])
    memo[i][m] = res
    return res solve if memo[i][m] != -1:
        return memo[i][m]
     memo[i][m] != -1 memo[i][m] [i] memo i m -1 return memo[i][m] memo[i][m] [i] memo i m if m == 0:
        memo[i][m] = 1
        return True
     m == 0 m 0 memo[i][m] = 1 memo[i][m] [i] memo i m 1 return True True if m < 0:
        memo[i][m] = 0
        return False
     m < 0 m 0 memo[i][m] = 0 memo[i][m] [i] memo i m 0 return False False if i >= N:
        memo[i][m] = 0
        return False
     i >= N i N memo[i][m] = 0 memo[i][m] [i] memo i m 0 return False False if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
     i == N-1 i N-1 N 1 memo[i][m] = (A[N-1] == m) memo[i][m] [i] memo i m A[N-1] == m A[N-1] A N-1 N 1 m return (A[N-1] == m) A[N-1] == m A[N-1] A N-1 N 1 m res = solve(i+1, m) or solve(i+1, m-A[i]) res solve(i+1, m) or solve(i+1, m-A[i]) solve(i+1, m) solve i+1 i 1 m solve(i+1, m-A[i]) solve i+1 i 1 m-A[i] m A[i] A i memo[i][m] = res memo[i][m] [i] memo i m res return res res i i m m for mi in m:
    if solve(0, mi):
        print("yes")
    else:
        print("no") mi m if solve(0, mi):
        print("yes")
    else:
        print("no") solve(0, mi) solve 0 mi print("yes") print "yes" print("no") print "no" A = list(map(int, input().split())) list(map(int, input().split())) A N = int(input()) int(input()) N Q = int(input()) int(input()) Q m = list(map(int, input().split())) list(map(int, input().split())) m memo = [[-1]*2000 for _ in range(20)] [[-1]*2000 for _ in range(20)] memo def solve(i, m):
    if memo[i][m] != -1:
        return memo[i][m]
    if m == 0:
        memo[i][m] = 1
        return True
    if m < 0:
        memo[i][m] = 0
        return False
    if i >= N:
        memo[i][m] = 0
        return False
    if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
    res = solve(i+1, m) or solve(i+1, m-A[i])
    memo[i][m] = res
    return res def solve(i, m):
    if memo[i][m] != -1:
        return memo[i][m]
    if m == 0:
        memo[i][m] = 1
        return True
    if m < 0:
        memo[i][m] = 0
        return False
    if i >= N:
        memo[i][m] = 0
        return False
    if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
    res = solve(i+1, m) or solve(i+1, m-A[i])
    memo[i][m] = res
    return res solve
N = int(input())
A = list(map(int, input().split()))
Q = int(input())
m = list(map(int, input().split()))
memo = [[-1]*2000 for _ in range(20)]
def solve(i, m):
    if memo[i][m] != -1:
        return memo[i][m]
    if m == 0:
        memo[i][m] = 1
        return True
    if m < 0:
        memo[i][m] = 0
        return False
    if i >= N:
        memo[i][m] = 0
        return False
    if i == N-1:
        memo[i][m] = (A[N-1] == m)
        return (A[N-1] == m)
    res = solve(i+1, m) or solve(i+1, m-A[i])
    memo[i][m] = res
    return res
for mi in m:
    if solve(0, mi):
        print("yes")
    else:
        print("no")
