def solve(arr, target):
	memo = {}
	return solve_rec(0, arr, target, memo)

def solve_rec(i, arr, target, memo):

	res = False

	key = str(i) + '-' + str(target)
	if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	memo[key] = res		
	return res

n = int(input())
arr = list(map(int, input().split()))
q = int(input())
targets = list(map(int, input().split()))
for i in range(q):
	res = solve(arr, targets[i])
	if res == True:
		print('yes')
	else:
		print('no') def solve(arr, target):
	memo = {}
	return solve_rec(0, arr, target, memo) solve memo = {} memo {} return solve_rec(0, arr, target, memo) solve_rec(0, arr, target, memo) solve_rec 0 arr target memo arr arr target target def solve_rec(i, arr, target, memo):

	res = False

	key = str(i) + '-' + str(target)
	if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	memo[key] = res		
	return res solve_rec res = False res False key = str(i) + '-' + str(target) key str(i) + '-' + str(target) str(i) + '-' str(i) str i '-' str(target) str target if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	 key in memo key memo res = memo[key] res memo[key] memo key elif target == 0:
		res = True
	 target == 0 target 0 res = True res True elif i >= len(arr):
		res = False
	 i >= len(arr) i len(arr) len arr res = False res False res1 = solve_rec(i + 1, arr, target, memo) res1 solve_rec(i + 1, arr, target, memo) solve_rec i + 1 i 1 arr target memo res2 = solve_rec(i + 1, arr, target - arr[i], memo) res2 solve_rec(i + 1, arr, target - arr[i], memo) solve_rec i + 1 i 1 arr target - arr[i] target arr[i] arr i memo res = res1 or res2 res res1 or res2 res1 res2 memo[key] = res memo[key] memo key res return res res i i arr arr target target memo memo n = int(input()) n int(input()) int input() input arr = list(map(int, input().split())) arr 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 targets = list(map(int, input().split())) targets list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split for i in range(q):
	res = solve(arr, targets[i])
	if res == True:
		print('yes')
	else:
		print('no') i range(q) range q res = solve(arr, targets[i]) res solve(arr, targets[i]) solve arr targets[i] targets i if res == True:
		print('yes')
	else:
		print('no') res == True res True print('yes') print 'yes' print('no') print 'no' targets = list(map(int, input().split())) list(map(int, input().split())) targets arr = list(map(int, input().split())) list(map(int, input().split())) arr q = int(input()) int(input()) q def solve(arr, target):
	memo = {}
	return solve_rec(0, arr, target, memo) def solve(arr, target):
	memo = {}
	return solve_rec(0, arr, target, memo) solve res = solve(arr, targets[i]) solve(arr, targets[i]) res def solve_rec(i, arr, target, memo):

	res = False

	key = str(i) + '-' + str(target)
	if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	memo[key] = res		
	return res def solve_rec(i, arr, target, memo):

	res = False

	key = str(i) + '-' + str(target)
	if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	memo[key] = res		
	return res solve_rec n = int(input()) int(input()) n
def solve(arr, target):
	memo = {}
	return solve_rec(0, arr, target, memo)

def solve_rec(i, arr, target, memo):

	res = False

	key = str(i) + '-' + str(target)
	if key in memo:
		res = memo[key]
	elif target == 0:
		res = True
	elif i >= len(arr):
		res = False
	else:
		res1 = solve_rec(i + 1, arr, target, memo)
		res2 = solve_rec(i + 1, arr, target - arr[i], memo)
		res = res1 or res2

	memo[key] = res		
	return res

n = int(input())
arr = list(map(int, input().split()))
q = int(input())
targets = list(map(int, input().split()))
for i in range(q):
	res = solve(arr, targets[i])
	if res == True:
		print('yes')
	else:
		print('no')
