from itertools import combinations

n, a, q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split())

cache = {}


def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result


l = list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1))

for m in ms:
    print('yes' if m in l else 'no') from itertools import combinations n, a, q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split()) n int(input()) int input() input a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q input() input ms map(int, input().split()) map int input().split() ().split () input split cache = {} cache {} def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result sum_a global a, cache if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result t in cache t cache return tmp + cache[t] tmp + cache[t] tmp cache[t] cache t elif len(t) == 1:
        return tmp + a[t[0]]
     len(t) == 1 len(t) len t 1 return tmp + a[t[0]] tmp + a[t[0]] tmp a[t[0]] a t[0] t 0 cache[t] = result = sum_a(tmp + a[t[0]], t[1:]) cache[t] cache t sum_a(tmp + a[t[0]], t[1:]) sum_a tmp + a[t[0]] tmp a[t[0]] a t[0] t 0 t[1:] t 1: 1 = result = sum_a(tmp + a[t[0]], t[1:]) result sum_a(tmp + a[t[0]], t[1:]) return result result tmp tmp t t l = list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1)) l list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1)) list sum_a(0, t) sum_a 0 t for m in ms:
    print('yes' if m in l else 'no') m ms print('yes' if m in l else 'no') print 'yes' if m in l else 'no' m in l m l 'yes' 'no' q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split()) input() q a, q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split()) list(map(int, input().split())) a cache = {} {} cache def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result sum_a n, a, q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split()) int(input()) n ms = int(input()), list(map(int, input().split())), input(), map(int, input().split()) map(int, input().split()) ms l = list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1)) list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1)) l
from itertools import combinations

n, a, q, ms = int(input()), list(map(int, input().split())), input(), map(int, input().split())

cache = {}


def sum_a(tmp, t):
    global a, cache
    if t in cache:
        return tmp + cache[t]
    elif len(t) == 1:
        return tmp + a[t[0]]
    else:
        cache[t] = result = sum_a(tmp + a[t[0]], t[1:])
        return result


l = list(sum_a(0, t) for i in range(n) for t in combinations(range(n), i + 1))

for m in ms:
    print('yes' if m in l else 'no')