if __name__ == '__main__':
    n = int(input())
    t = list(map(int, input().split()))
    m = int(input())
    s = list(map(int, input().split()))

    def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

    for r in s:
        print('yes' if solve(0, r) else 'no')
 if __name__ == '__main__':
    n = int(input())
    t = list(map(int, input().split()))
    m = int(input())
    s = list(map(int, input().split()))

    def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

    for r in s:
        print('yes' if solve(0, r) else 'no') __name__ == '__main__' __name__ '__main__' n = int(input()) n int(input()) int input() input t = list(map(int, input().split())) t list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split m = int(input()) m int(input()) int input() input s = list(map(int, input().split())) s list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

     solve if mm == 0:
            return True
         mm == 0 mm 0 return True True if i >= n:
            return False
         i >= n i n return False False if sum(t[i::]) < mm:
            return False
         sum(t[i::]) < mm sum(t[i::]) sum t[i::] t i:: i mm return False False res = solve(i + 1, mm) or solve(i + 1, mm - t[i]) res solve(i + 1, mm) or solve(i + 1, mm - t[i]) solve(i + 1, mm) solve i + 1 i 1 mm solve(i + 1, mm - t[i]) solve i + 1 i 1 mm - t[i] mm t[i] t i return res res i i mm mm for r in s:
        print('yes' if solve(0, r) else 'no') r s print('yes' if solve(0, r) else 'no') print 'yes' if solve(0, r) else 'no' solve(0, r) solve 0 r 'yes' 'no' t = list(map(int, input().split())) list(map(int, input().split())) t s = list(map(int, input().split())) list(map(int, input().split())) s n = int(input()) int(input()) n m = int(input()) int(input()) m def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

     def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

     solve
if __name__ == '__main__':
    n = int(input())
    t = list(map(int, input().split()))
    m = int(input())
    s = list(map(int, input().split()))

    def solve(i, mm):
        if mm == 0:
            return True
        if i >= n:
            return False
        if sum(t[i::]) < mm:
            return False
        res = solve(i + 1, mm) or solve(i + 1, mm - t[i])
        return res

    for r in s:
        print('yes' if solve(0, r) else 'no')

