N = int(input().rstrip())
A = [int(_) for _ in input().rstrip().split(" ")]
Q = int(input().rstrip())
M = [int(_) for _ in input().rstrip().split(" ")]

import itertools

from functools import lru_cache

@lru_cache(maxsize=2**12)
def solve(i, m):
    if m == 0:
        return True
    elif i >= N:
        return False
    res = solve(i+1, m) or solve(i+1, m - A[i])
    return res
        
        
for m in M:
    if solve(0, m):
        print("yes")
    else:
        print("no") N = int(input().rstrip()) N int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip int(_) for _ in input().rstrip().split(" ") for _ in input().rstrip().split(" ") _ input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " for _ in input().rstrip().split(" ") int(_) int _ A = [int(_) for _ in input().rstrip().split(" ")] A [int(_) for _ in input().rstrip().split(" ")] Q = int(input().rstrip()) Q int(input().rstrip()) int input().rstrip() ().rstrip () input rstrip int(_) for _ in input().rstrip().split(" ") for _ in input().rstrip().split(" ") _ input().rstrip().split(" ") ().rstrip().split ().rstrip() ().rstrip () input rstrip split " " for _ in input().rstrip().split(" ") int(_) int _ M = [int(_) for _ in input().rstrip().split(" ")] M [int(_) for _ in input().rstrip().split(" ")] import itertools itertools from functools import lru_cache def solve(i, m):
    if m == 0:
        return True
    elif i >= N:
        return False
    res = solve(i+1, m) or solve(i+1, m - A[i])
    return res
        
         solve if m == 0:
        return True
    elif i >= N:
        return False
     m == 0 m 0 return True True elif i >= N:
        return False
     i >= N i N return False False res = solve(i+1, m) or solve(i+1, m - A[i]) res solve(i+1, m) or solve(i+1, m - A[i]) solve(i+1, m) solve i+1 i 1 m solve(i+1, m - A[i]) solve i+1 i 1 m - A[i] m A[i] A i return res res i i m m @lru_cache(maxsize=2**12) solve maxsize=2**12 @lru_cache(maxsize=2**12) lru_cache maxsize=2**12 maxsize 2**12 2 12 solve for m in M:
    if solve(0, m):
        print("yes")
    else:
        print("no") m M if solve(0, m):
        print("yes")
    else:
        print("no") solve(0, m) solve 0 m print("yes") print "yes" print("no") print "no" def solve(i, m):
    if m == 0:
        return True
    elif i >= N:
        return False
    res = solve(i+1, m) or solve(i+1, m - A[i])
    return res
        
         def solve(i, m):
    if m == 0:
        return True
    elif i >= N:
        return False
    res = solve(i+1, m) or solve(i+1, m - A[i])
    return res
        
         solve Q = int(input().rstrip()) int(input().rstrip()) Q M = [int(_) for _ in input().rstrip().split(" ")] [int(_) for _ in input().rstrip().split(" ")] M N = int(input().rstrip()) int(input().rstrip()) N A = [int(_) for _ in input().rstrip().split(" ")] [int(_) for _ in input().rstrip().split(" ")] A
N = int(input().rstrip())
A = [int(_) for _ in input().rstrip().split(" ")]
Q = int(input().rstrip())
M = [int(_) for _ in input().rstrip().split(" ")]

import itertools

from functools import lru_cache

@lru_cache(maxsize=2**12)
def solve(i, m):
    if m == 0:
        return True
    elif i >= N:
        return False
    res = solve(i+1, m) or solve(i+1, m - A[i])
    return res
        
        
for m in M:
    if solve(0, m):
        print("yes")
    else:
        print("no")
