
def rec(i, w):
	if dp[i][w] != -1:
		return dp[i][w]

	if i == 0:
		if w == 0:
			return True
		else:
			return False

	res = 0
	if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	if rec(i - 1, w) == 1:
		res = 1

	dp[i][w] = res
	return dp[i][w]

n = int(input())
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))

dp = [[-1] * (2000 + 1) for _ in range(n + 1)]

for i in range(m):
	print('yes') if rec(n, q[i]) == 1 else print('no') def rec(i, w):
	if dp[i][w] != -1:
		return dp[i][w]

	if i == 0:
		if w == 0:
			return True
		else:
			return False

	res = 0
	if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	if rec(i - 1, w) == 1:
		res = 1

	dp[i][w] = res
	return dp[i][w] rec if dp[i][w] != -1:
		return dp[i][w]

	 dp[i][w] != -1 dp[i][w] [i] dp i w -1 return dp[i][w] dp[i][w] [i] dp i w if i == 0:
		if w == 0:
			return True
		else:
			return False

	 i == 0 i 0 if w == 0:
			return True
		else:
			return False

	 w == 0 w 0 return True True return False False res = 0 res 0 if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	 w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1 w >= a[i - 1] w a[i - 1] a i - 1 i 1 rec(i - 1, w - a[i - 1]) == 1 rec(i - 1, w - a[i - 1]) rec i - 1 i 1 w - a[i - 1] w a[i - 1] a i - 1 i 1 1 res = 1 res 1 if rec(i - 1, w) == 1:
		res = 1

	 rec(i - 1, w) == 1 rec(i - 1, w) rec i - 1 i 1 w 1 res = 1 res 1 dp[i][w] = res dp[i][w] [i] dp i w res return dp[i][w] dp[i][w] [i] dp i w i i w w 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 m = int(input()) m int(input()) int input() input q = list(map(int, input().split())) q list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [-1] * (2000 + 1) for _ in range(n + 1) for _ in range(n + 1) _ range(n + 1) range n + 1 n 1 for _ in range(n + 1) [-1] * (2000 + 1) [-1] -1 2000 + 1 2000 1 dp = [[-1] * (2000 + 1) for _ in range(n + 1)] dp [[-1] * (2000 + 1) for _ in range(n + 1)] for i in range(m):
	print('yes') if rec(n, q[i]) == 1 else print('no') i range(m) range m print('yes') if rec(n, q[i]) == 1 else print('no') rec(n, q[i]) == 1 rec(n, q[i]) rec n q[i] q i 1 print('yes') print 'yes' print('no') print 'no' dp = [[-1] * (2000 + 1) for _ in range(n + 1)] [[-1] * (2000 + 1) for _ in range(n + 1)] dp m = int(input()) int(input()) m n = int(input()) int(input()) n def rec(i, w):
	if dp[i][w] != -1:
		return dp[i][w]

	if i == 0:
		if w == 0:
			return True
		else:
			return False

	res = 0
	if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	if rec(i - 1, w) == 1:
		res = 1

	dp[i][w] = res
	return dp[i][w] def rec(i, w):
	if dp[i][w] != -1:
		return dp[i][w]

	if i == 0:
		if w == 0:
			return True
		else:
			return False

	res = 0
	if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	if rec(i - 1, w) == 1:
		res = 1

	dp[i][w] = res
	return dp[i][w] rec a = list(map(int, input().split())) list(map(int, input().split())) a q = list(map(int, input().split())) list(map(int, input().split())) q

def rec(i, w):
	if dp[i][w] != -1:
		return dp[i][w]

	if i == 0:
		if w == 0:
			return True
		else:
			return False

	res = 0
	if w >= a[i - 1] and rec(i - 1, w - a[i - 1]) == 1:
		res = 1
	
	if rec(i - 1, w) == 1:
		res = 1

	dp[i][w] = res
	return dp[i][w]

n = int(input())
a = list(map(int, input().split()))
m = int(input())
q = list(map(int, input().split()))

dp = [[-1] * (2000 + 1) for _ in range(n + 1)]

for i in range(m):
	print('yes') if rec(n, q[i]) == 1 else print('no')
