
        
def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m]

n = input()
a = map(int,raw_input().split())
q = input()
p = map(int,raw_input().split())
dp = [[-1 for i in xrange(2001)] for j in xrange(21)]
for i in xrange(q):
    if solve(0,p[i]):
        print "yes"
    else:
        print "no" def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] solve if dp[i][m] != -1:
        return dp[i][m]
     dp[i][m] != -1 dp[i][m] [i] dp i m -1 return dp[i][m] dp[i][m] [i] dp i m if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
     m == 0 m 0 dp[i][m] = True dp[i][m] [i] dp i m True elif i >= n:
        dp[i][m] = False
     i >= n i n dp[i][m] = False dp[i][m] [i] dp i m False elif solve(i+1, m):
        dp[i][m] = True
     solve(i+1, m) solve i+1 i 1 m dp[i][m] = True dp[i][m] [i] dp i m True elif solve(i+1, m-a[i]):
        dp[i][m] = True
     solve(i+1, m-a[i]) solve i+1 i 1 m-a[i] m a[i] a i dp[i][m] = True dp[i][m] [i] dp i m True dp[i][m] = False dp[i][m] [i] dp i m False return dp[i][m] dp[i][m] [i] dp i m i i m m n = input() n input() input a = map(int,raw_input().split()) a map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split q = input() q input() input p = map(int,raw_input().split()) p map(int,raw_input().split()) map int raw_input().split() ().split () raw_input split [-1 for i in xrange(2001)] for j in xrange(21) for j in xrange(21) j xrange(21) xrange 21 for j in xrange(21) [-1 for i in xrange(2001)] dp = [[-1 for i in xrange(2001)] for j in xrange(21)] dp [[-1 for i in xrange(2001)] for j in xrange(21)] for i in xrange(q):
    if solve(0,p[i]):
        print "yes"
    else:
        print "no" i xrange(q) xrange q if solve(0,p[i]):
        print "yes"
    else:
        print "no" solve(0,p[i]) solve 0 p[i] p i print print dp = [[-1 for i in xrange(2001)] for j in xrange(21)] [[-1 for i in xrange(2001)] for j in xrange(21)] dp a = map(int,raw_input().split()) map(int,raw_input().split()) a q = input() input() q n = input() input() n p = map(int,raw_input().split()) map(int,raw_input().split()) p def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m] solve

        
def solve(i,m):
    if dp[i][m] != -1:
        return dp[i][m]
    if m == 0:
        dp[i][m] = True
    elif i >= n:
        dp[i][m] = False
    elif solve(i+1, m):
        dp[i][m] = True
    elif solve(i+1, m-a[i]):
        dp[i][m] = True
    else:
        dp[i][m] = False
    return dp[i][m]

n = input()
a = map(int,raw_input().split())
q = input()
p = map(int,raw_input().split())
dp = [[-1 for i in xrange(2001)] for j in xrange(21)]
for i in xrange(q):
    if solve(0,p[i]):
        print "yes"
    else:
        print "no"