n = int(input())
ary = [int(_) for _ in input().split()]
q = int(input())
qs = [int(_) for _ in input().split()]


def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q)


def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False


for q in qs:
    if search(q):
        print('yes')
    else:
        print('no')
 n = int(input()) n int(input()) int input() input int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ ary = [int(_) for _ in input().split()] ary [int(_) for _ in input().split()] q = int(input()) q int(input()) int input() input int(_) for _ in input().split() for _ in input().split() _ input().split() ().split () input split for _ in input().split() int(_) int _ qs = [int(_) for _ in input().split()] qs [int(_) for _ in input().split()] def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) search_rec if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) ind == n ind n return False False tmp = ary[ind] tmp ary[ind] ary ind if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) s + tmp == q s + tmp s tmp q return True True return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) search(ind + 1, s, q) or search(ind + 1, s + tmp, q) search(ind + 1, s, q) search ind + 1 ind 1 s q search(ind + 1, s + tmp, q) search ind + 1 ind 1 s + tmp s tmp q ind ind s s q q def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False search sum_ary = [0] sum_ary [0] 0 for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False i ary for s in sum_ary:
            if s + i == q:
                return True
         s sum_ary if s + i == q:
                return True
         s + i == q s + i s i q return True True i + _ for _ in sum_ary for _ in sum_ary _ sum_ary for _ in sum_ary i + _ i _ sum_ary += [i + _ for _ in sum_ary] sum_ary [i + _ for _ in sum_ary] return False False q q for q in qs:
    if search(q):
        print('yes')
    else:
        print('no') q qs if search(q):
        print('yes')
    else:
        print('no') search(q) search q print('yes') print 'yes' print('no') print 'no' qs = [int(_) for _ in input().split()] [int(_) for _ in input().split()] qs def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False search q = int(input()) int(input()) q n = int(input()) int(input()) n def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q) search_rec ary = [int(_) for _ in input().split()] [int(_) for _ in input().split()] ary
n = int(input())
ary = [int(_) for _ in input().split()]
q = int(input())
qs = [int(_) for _ in input().split()]


def search_rec(ind, s, q):
    if ind == n:
        return False
    else:
        tmp = ary[ind]
        if s + tmp == q:
            return True
        else:
            return search(ind + 1, s, q) or search(ind + 1, s + tmp, q)


def search(q):
    sum_ary = [0]

    for i in ary:
        for s in sum_ary:
            if s + i == q:
                return True
        sum_ary += [i + _ for _ in sum_ary]

    else:
        return False


for q in qs:
    if search(q):
        print('yes')
    else:
        print('no')

