from functools import lru_cache

n = int(input())
A = sorted(list(map(int, input().split())))
q = int(input())
query = list(map(int, input().split()))

@lru_cache(maxsize=None)
def solve(i, m):
    if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m)

for m in query:
    if solve(0, m):
        print("yes")
    else:
        print("no") from functools import lru_cache n = int(input()) n int(input()) int input() input A = sorted(list(map(int, input().split()))) A sorted(list(map(int, input().split()))) sorted list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input query = list(map(int, input().split())) query list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def solve(i, m):
    if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m) solve if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m) m == 0 m 0 return True True elif i >= n or m < A[i]:
        return False
     i >= n or m < A[i] i >= n i n m < A[i] m A[i] A i return False False return solve(i + 1, m - A[i]) or solve(i + 1, m) solve(i + 1, m - A[i]) or solve(i + 1, m) solve(i + 1, m - A[i]) solve i + 1 i 1 m - A[i] m A[i] A i solve(i + 1, m) solve i + 1 i 1 m i i m m @lru_cache(maxsize=None) solve maxsize=None @lru_cache(maxsize=None) lru_cache maxsize=None maxsize None solve for m in query:
    if solve(0, m):
        print("yes")
    else:
        print("no") m query if solve(0, m):
        print("yes")
    else:
        print("no") solve(0, m) solve 0 m print("yes") print "yes" print("no") print "no" q = int(input()) int(input()) q n = int(input()) int(input()) n query = list(map(int, input().split())) list(map(int, input().split())) query A = sorted(list(map(int, input().split()))) sorted(list(map(int, input().split()))) A def solve(i, m):
    if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m) def solve(i, m):
    if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m) solve
from functools import lru_cache

n = int(input())
A = sorted(list(map(int, input().split())))
q = int(input())
query = list(map(int, input().split()))

@lru_cache(maxsize=None)
def solve(i, m):
    if m == 0:
        return True
    elif i >= n or m < A[i]:
        return False
    else:
        return solve(i + 1, m - A[i]) or solve(i + 1, m)

for m in query:
    if solve(0, m):
        print("yes")
    else:
        print("no")