def subset_sum(n, s, a):
	dp = [[0 for x in range(s+1)] for x in range(n+1)]
	for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	return dp[n][s] > 0

n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
for i in range(q):
	if subset_sum(n, m[i], a) == True:
		print('yes')
	else:
		print('no')
 def subset_sum(n, s, a):
	dp = [[0 for x in range(s+1)] for x in range(n+1)]
	for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	return dp[n][s] > 0 subset_sum [0 for x in range(s+1)] for x in range(n+1) for x in range(n+1) x range(n+1) range n+1 n 1 for x in range(n+1) [0 for x in range(s+1)] dp = [[0 for x in range(s+1)] for x in range(n+1)] dp [[0 for x in range(s+1)] for x in range(n+1)] for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	 i range(n) range n v = a[i] v a[i] a i for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	 j range(s+1) range s+1 s 1 if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	 v==j or (v<j and dp[i][j-v]>0) v==j v j v<j and dp[i][j-v]>0 v<j v j dp[i][j-v]>0 dp[i][j-v] [i] dp i j-v j v 0 dp[i+1][j] = dp[i][j] + 1 dp[i+1][j] [i+1] dp i+1 i 1 j 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 return dp[n][s] > 0 dp[n][s] > 0 dp[n][s] [n] dp n s 0 n n s s a a 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 for i in range(q):
	if subset_sum(n, m[i], a) == True:
		print('yes')
	else:
		print('no') i range(q) range q if subset_sum(n, m[i], a) == True:
		print('yes')
	else:
		print('no') subset_sum(n, m[i], a) == True subset_sum(n, m[i], a) subset_sum n m[i] m i a True print('yes') print 'yes' print('no') print 'no' m = list(map(int, input().split())) list(map(int, input().split())) m a = list(map(int, input().split())) list(map(int, input().split())) a q = int(input()) int(input()) q def subset_sum(n, s, a):
	dp = [[0 for x in range(s+1)] for x in range(n+1)]
	for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	return dp[n][s] > 0 def subset_sum(n, s, a):
	dp = [[0 for x in range(s+1)] for x in range(n+1)]
	for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	return dp[n][s] > 0 subset_sum n = int(input()) int(input()) n
def subset_sum(n, s, a):
	dp = [[0 for x in range(s+1)] for x in range(n+1)]
	for i in range(n):
		v = a[i]
		for j in range(s+1):
			if v==j or (v<j and dp[i][j-v]>0):
				dp[i+1][j] = dp[i][j] + 1
			else:
				dp[i+1][j] = dp[i][j]
	return dp[n][s] > 0

n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
for i in range(q):
	if subset_sum(n, m[i], a) == True:
		print('yes')
	else:
		print('no')

