def abc(a,b,c):
    if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c)

n = int(input())
A = [int(a) for a in input().split()]
q = int(input())
M = [int(m) for m in input().split()]
s = set()

abc(0,0,0)
abc(0,1,0)

for m in M:
    if m in s:
        print("yes")
    else:
        print("no") def abc(a,b,c):
    if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c) abc if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c) a==n a n if b == 1:
            c += A[a]
            s.add(c)
         b == 1 b 1 c += A[a] c A[a] A a s.add(c) s.add s add c abc(a+1,0,c) abc a+1 a 1 0 c abc(a+1,1,c) abc a+1 a 1 1 c a a b b c c n = int(input()) n int(input()) int input() input int(a) for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a A = [int(a) for a in input().split()] A [int(a) for a in input().split()] q = int(input()) q int(input()) int input() input int(m) for m in input().split() for m in input().split() m input().split() ().split () input split for m in input().split() int(m) int m M = [int(m) for m in input().split()] M [int(m) for m in input().split()] s = set() s set() set abc(0,0,0) abc 0 0 0 abc(0,1,0) abc 0 1 0 for m in M:
    if m in s:
        print("yes")
    else:
        print("no") m M if m in s:
        print("yes")
    else:
        print("no") m in s m s print("yes") print "yes" print("no") print "no" A = [int(a) for a in input().split()] [int(a) for a in input().split()] A n = int(input()) int(input()) n def abc(a,b,c):
    if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c) def abc(a,b,c):
    if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c) abc M = [int(m) for m in input().split()] [int(m) for m in input().split()] M s = set() set() s q = int(input()) int(input()) q
def abc(a,b,c):
    if a==n:
        pass
    else:
        if b == 1:
            c += A[a]
            s.add(c)
        abc(a+1,0,c)
        abc(a+1,1,c)

n = int(input())
A = [int(a) for a in input().split()]
q = int(input())
M = [int(m) for m in input().split()]
s = set()

abc(0,0,0)
abc(0,1,0)

for m in M:
    if m in s:
        print("yes")
    else:
        print("no")