n = int(input())
A = list(map(int,input().split()))
m = int(input())
B = list(map(int,input().split()))

def solve2(x,y):
    if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
            
S = [0 for i in range(2001)]

solve2(0,0)

def solve(x,y):
    if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
    
for i in range(m):
    if (i>50 and (S[B[i]] == 1)):
        print("yes")
    elif (i>50 and (S[B[i]] == 0)):
        print("no")
    else:
        if solve(0,B[i]):
            print("yes")
        else:
            print("no") 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 B = list(map(int,input().split())) B list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split def solve2(x,y):
    if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
             solve2 if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
             x==n x n S[y] = 1 S[y] S y 1 solve2(x+1,y) solve2 x+1 x 1 y if y+A[x] < 2001:
            solve2(x+1,y+A[x])
             y+A[x] < 2001 y+A[x] y A[x] A x 2001 solve2(x+1,y+A[x]) solve2 x+1 x 1 y+A[x] y A[x] A x x x y y 0 for i in range(2001) for i in range(2001) i range(2001) range 2001 for i in range(2001) 0 S = [0 for i in range(2001)] S [0 for i in range(2001)] solve2(0,0) solve2 0 0 def solve(x,y):
    if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
     solve if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
     y<0 y 0 return False False elif y==0:
        return True
     y==0 y 0 return True True elif x==n:
        return False
     x==n x n return False False return solve(x+1,y) or solve(x+1,y-A[x]) solve(x+1,y) or solve(x+1,y-A[x]) solve(x+1,y) solve x+1 x 1 y solve(x+1,y-A[x]) solve x+1 x 1 y-A[x] y A[x] A x x x y y for i in range(m):
    if (i>50 and (S[B[i]] == 1)):
        print("yes")
    elif (i>50 and (S[B[i]] == 0)):
        print("no")
    else:
        if solve(0,B[i]):
            print("yes")
        else:
            print("no") i range(m) range m if (i>50 and (S[B[i]] == 1)):
        print("yes")
    elif (i>50 and (S[B[i]] == 0)):
        print("no")
    else:
        if solve(0,B[i]):
            print("yes")
        else:
            print("no") i>50 and (S[B[i]] == 1) i>50 i 50 S[B[i]] == 1 S[B[i]] S B[i] B i 1 print("yes") print "yes" elif (i>50 and (S[B[i]] == 0)):
        print("no")
     i>50 and (S[B[i]] == 0) i>50 i 50 S[B[i]] == 0 S[B[i]] S B[i] B i 0 print("no") print "no" if solve(0,B[i]):
            print("yes")
        else:
            print("no") solve(0,B[i]) solve 0 B[i] B i print("yes") print "yes" print("no") print "no" n = int(input()) int(input()) n def solve2(x,y):
    if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
             def solve2(x,y):
    if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
             solve2 A = list(map(int,input().split())) list(map(int,input().split())) A S = [0 for i in range(2001)] [0 for i in range(2001)] S m = int(input()) int(input()) m B = list(map(int,input().split())) list(map(int,input().split())) B def solve(x,y):
    if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
     def solve(x,y):
    if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
     solve
n = int(input())
A = list(map(int,input().split()))
m = int(input())
B = list(map(int,input().split()))

def solve2(x,y):
    if x==n:
        S[y] = 1
    else:
        solve2(x+1,y)
        if y+A[x] < 2001:
            solve2(x+1,y+A[x])
            
S = [0 for i in range(2001)]

solve2(0,0)

def solve(x,y):
    if y<0:
        return False
    elif y==0:
        return True
    elif x==n:
        return False
    else:
        return solve(x+1,y) or solve(x+1,y-A[x])
    
for i in range(m):
    if (i>50 and (S[B[i]] == 1)):
        print("yes")
    elif (i>50 and (S[B[i]] == 0)):
        print("no")
    else:
        if solve(0,B[i]):
            print("yes")
        else:
            print("no")
