isExist = [False]*2001 

n = int( eval(input()) )

A = [ int( val ) for val in input().rstrip().split( ' ' ) ]

for i in A:

	for j in range( 2000-i, 0, -1 ):

		if isExist[j]:

			isExist[ i+j ] = True

	isExist[i] = True



q = int( eval(input()) )

M = [ int( val ) for val in input().rstrip().split( ' ' ) ]

for i in range( 0, q ):

	if isExist[ M[i] ]:

		print( "yes" )

	else:

		print( "no" )
isExist = [False]*2001 

n = int( input() )

A = [ int( val ) for val in input().rstrip().split( ' ' ) ]

for i in A:

	for j in range( 2000-i, 0, -1 ):

		if isExist[j]:

			isExist[ i+j ] = True

	isExist[i] = True



q = int( input() )

M = [ int( val ) for val in input().rstrip().split( ' ' ) ]

for i in range( 0, q ):

	if isExist[ M[i] ]:

		print( "yes" )

	else:

		print( "no" )
isExist = [False] * 2001
n = int(eval(input()))
A = [int(val) for val in input().rstrip().split(" ")]
for i in A:
    for j in range(2000 - i, 0, -1):
        if isExist[j]:
            isExist[i + j] = True
    isExist[i] = True
q = int(eval(input()))
M = [int(val) for val in input().rstrip().split(" ")]
for i in range(0, q):
    if isExist[M[i]]:
        print("yes")
    else:
        print("no")

isExist = [False] * 2001
n = int(input())
A = [int(val) for val in input().rstrip().split(" ")]
for i in A:
    for j in range(2000 - i, 0, -1):
        if isExist[j]:
            isExist[i + j] = True
    isExist[i] = True
q = int(input())
M = [int(val) for val in input().rstrip().split(" ")]
for i in range(0, q):
    if isExist[M[i]]:
        print("yes")
    else:
        print("no")

-n = int(eval(input())) +n = int(input()) -q = int(eval(input())) +q = int(input())