from itertools import repeat
from itertools import combinations

def rec(s, i, total, m):
    if total == m:
        return 1

    if len(s) == i or total > m:
        return 0

    return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m)


def makeCache(s):
    cache = {}
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

    return cache

def loop(s, m):
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

    return 0

if __name__ == "__main__":
    n = int(input())
    a = [int (x) for x in input().split()]
    q = int(input())
    m = [int (x) for x in input().split()]
    s = makeCache(a)
    for i in m:
        #print("yes") if rec(a, 0, 0, i) > 0 else print("no")
        #print("yes") if loop(a, i) > 0 else print("no")
        print("yes") if i in s else print("no")
 from itertools import repeat from itertools import combinations def rec(s, i, total, m):
    if total == m:
        return 1

    if len(s) == i or total > m:
        return 0

    return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m) rec if total == m:
        return 1

     total == m total m return 1 1 if len(s) == i or total > m:
        return 0

     len(s) == i or total > m len(s) == i len(s) len s i total > m total m return 0 0 return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m) rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m) rec(s, i + 1, total, m) rec s i + 1 i 1 total m rec(s, i + 1, total + s[i], m) rec s i + 1 i 1 total + s[i] total s[i] s i m s s i i total total m m def makeCache(s):
    cache = {}
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

    return cache makeCache cache = {} cache {} for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

     i range(len(s)) range len(s) len s comb = list(combinations(s, i)) comb list(combinations(s, i)) list combinations(s, i) combinations s i for c in comb:
            cache[sum(c)] = 1

     c comb cache[sum(c)] = 1 cache[sum(c)] cache sum(c) sum c 1 return cache cache s s def loop(s, m):
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

    return 0 loop for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

     i range(len(s)) range len(s) len s comb = list(combinations(s, i)) comb list(combinations(s, i)) list combinations(s, i) combinations s i for c in comb:
            if sum(c) == m:
                return 1

     c comb if sum(c) == m:
                return 1

     sum(c) == m sum(c) sum c m return 1 1 return 0 0 s s m m if __name__ == "__main__":
    n = int(input())
    a = [int (x) for x in input().split()]
    q = int(input())
    m = [int (x) for x in input().split()]
    s = makeCache(a)
    for i in m:
        #print("yes") if rec(a, 0, 0, i) > 0 else print("no")
        #print("yes") if loop(a, i) > 0 else print("no")
        print("yes") if i in s else print("no") __name__ == "__main__" __name__ "__main__" n = int(input()) n int(input()) int input() input int (x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int (x) int x a = [int (x) for x in input().split()] a [int (x) for x in input().split()] q = int(input()) q int(input()) int input() input int (x) for x in input().split() for x in input().split() x input().split() ().split () input split for x in input().split() int (x) int x m = [int (x) for x in input().split()] m [int (x) for x in input().split()] s = makeCache(a) s makeCache(a) makeCache a for i in m:
        #print("yes") if rec(a, 0, 0, i) > 0 else print("no")
        #print("yes") if loop(a, i) > 0 else print("no")
        print("yes") if i in s else print("no") i m print("yes") if i in s else print("no") i in s i s print("yes") print "yes" print("no") print "no" def rec(s, i, total, m):
    if total == m:
        return 1

    if len(s) == i or total > m:
        return 0

    return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m) def rec(s, i, total, m):
    if total == m:
        return 1

    if len(s) == i or total > m:
        return 0

    return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m) rec def loop(s, m):
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

    return 0 def loop(s, m):
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

    return 0 loop s = makeCache(a) makeCache(a) s m = [int (x) for x in input().split()] [int (x) for x in input().split()] m def makeCache(s):
    cache = {}
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

    return cache def makeCache(s):
    cache = {}
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

    return cache makeCache a = [int (x) for x in input().split()] [int (x) for x in input().split()] a q = int(input()) int(input()) q n = int(input()) int(input()) n
from itertools import repeat
from itertools import combinations

def rec(s, i, total, m):
    if total == m:
        return 1

    if len(s) == i or total > m:
        return 0

    return rec(s, i + 1, total, m) + rec(s, i + 1, total + s[i], m)


def makeCache(s):
    cache = {}
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            cache[sum(c)] = 1

    return cache

def loop(s, m):
    for i in range(len(s)):
        comb = list(combinations(s, i))
        for c in comb:
            if sum(c) == m:
                return 1

    return 0

if __name__ == "__main__":
    n = int(input())
    a = [int (x) for x in input().split()]
    q = int(input())
    m = [int (x) for x in input().split()]
    s = makeCache(a)
    for i in m:
        #print("yes") if rec(a, 0, 0, i) > 0 else print("no")
        #print("yes") if loop(a, i) > 0 else print("no")
        print("yes") if i in s else print("no")

