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


def memoize(f):
    cache = {}

    def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
    return helper


def main():
    for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no')


@memoize
def solve(i, m):
    if m == 0:
        return True

    if i >= n:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - a[i])
    return res


if __name__ == '__main__':
    main()
 n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a 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 m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def memoize(f):
    cache = {}

    def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
    return helper memoize cache = {} cache {} def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
     helper if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
         (x, y) not in cache (x, y) x y cache cache[(x, y)] = f(x, y) cache[(x, y)] cache (x, y) x y f(x, y) f x y return cache[(x, y)] cache[(x, y)] cache (x, y) x y x x y y return helper helper f f def main():
    for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no') main for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no') number m if solve(0, number):
            print('yes')
        else:
            print('no') solve(0, number) solve 0 number print('yes') print 'yes' print('no') print 'no' def solve(i, m):
    if m == 0:
        return True

    if i >= n:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - a[i])
    return res solve if m == 0:
        return True

     m == 0 m 0 return True True if 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 @memoize solve memoize solve if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no') def main():
    for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no') main m = list(map(int, input().split())) list(map(int, input().split())) m a = list(map(int, input().split())) list(map(int, input().split())) a def solve(i, m):
    if m == 0:
        return True

    if 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

    if i >= n:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - a[i])
    return res solve def memoize(f):
    cache = {}

    def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
    return helper def memoize(f):
    cache = {}

    def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
    return helper memoize n = int(input()) int(input()) n q = int(input()) int(input()) q
n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))


def memoize(f):
    cache = {}

    def helper(x, y):
        if (x, y) not in cache:
            cache[(x, y)] = f(x, y)
        return cache[(x, y)]
    return helper


def main():
    for number in m:
        if solve(0, number):
            print('yes')
        else:
            print('no')


@memoize
def solve(i, m):
    if m == 0:
        return True

    if i >= n:
        return False

    res = solve(i + 1, m) or solve(i + 1, m - a[i])
    return res


if __name__ == '__main__':
    main()

