#!/usr/bin/python3
# -*- coding: utf-8 -*-

def solve(p, t, A, result):
    if A[p] == t:
        result[(p,t)] = True
        return True
    if p == len(A) - 1:
        return False
    if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
    if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
    if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
    result[(p,t)] = False 
    return False

import sys

n = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
num_q = int(sys.stdin.readline())
query = list(map(int, sys.stdin.readline().split()))
result = dict()

for m in query:
    if solve(0, m, A, result):
        print('yes')
    else:
        print('no')
 def solve(p, t, A, result):
    if A[p] == t:
        result[(p,t)] = True
        return True
    if p == len(A) - 1:
        return False
    if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
    if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
    if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
    result[(p,t)] = False 
    return False solve if A[p] == t:
        result[(p,t)] = True
        return True
     A[p] == t A[p] A p t result[(p,t)] = True result[(p,t)] result (p,t) p t True return True True if p == len(A) - 1:
        return False
     p == len(A) - 1 p len(A) - 1 len(A) len A 1 return False False if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
     (p,t) in result (p,t) p t result return result[(p,t)] result[(p,t)] result (p,t) p t if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
     solve(p+1, t-A[p], A, result) solve p+1 p 1 t-A[p] t A[p] A p A result result[(p,t)] = True result[(p,t)] result (p,t) p t True return True True if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
     solve(p+1, t, A, result) solve p+1 p 1 t A result result[(p,t)] = True result[(p,t)] result (p,t) p t True return True True result[(p,t)] = False result[(p,t)] result (p,t) p t False return False False p p t t A A result result import sys sys n = int(sys.stdin.readline()) n int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline A = list(map(int, sys.stdin.readline().split())) A list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split num_q = int(sys.stdin.readline()) num_q int(sys.stdin.readline()) int sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline query = list(map(int, sys.stdin.readline().split())) query list(map(int, sys.stdin.readline().split())) list map(int, sys.stdin.readline().split()) map int sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split result = dict() result dict() dict for m in query:
    if solve(0, m, A, result):
        print('yes')
    else:
        print('no') m query if solve(0, m, A, result):
        print('yes')
    else:
        print('no') solve(0, m, A, result) solve 0 m A result print('yes') print 'yes' print('no') print 'no' n = int(sys.stdin.readline()) int(sys.stdin.readline()) n num_q = int(sys.stdin.readline()) int(sys.stdin.readline()) num_q query = list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) query def solve(p, t, A, result):
    if A[p] == t:
        result[(p,t)] = True
        return True
    if p == len(A) - 1:
        return False
    if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
    if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
    if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
    result[(p,t)] = False 
    return False def solve(p, t, A, result):
    if A[p] == t:
        result[(p,t)] = True
        return True
    if p == len(A) - 1:
        return False
    if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
    if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
    if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
    result[(p,t)] = False 
    return False solve A = list(map(int, sys.stdin.readline().split())) list(map(int, sys.stdin.readline().split())) A result = dict() dict() result
#!/usr/bin/python3
# -*- coding: utf-8 -*-

def solve(p, t, A, result):
    if A[p] == t:
        result[(p,t)] = True
        return True
    if p == len(A) - 1:
        return False
    if (p,t) in result:
        # print('Cache Hit')
        return result[(p,t)]
    if solve(p+1, t-A[p], A, result):
        result[(p,t)] = True
        return True
    if solve(p+1, t, A, result):
        result[(p,t)] = True
        return True
    result[(p,t)] = False 
    return False

import sys

n = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))
num_q = int(sys.stdin.readline())
query = list(map(int, sys.stdin.readline().split()))
result = dict()

for m in query:
    if solve(0, m, A, result):
        print('yes')
    else:
        print('no')

