def stdinput():
    from sys import stdin
    return stdin.readline().strip()

def main():
    from itertools import combinations
    n = int(stdinput())
    *A, = map(int, stdinput().split(' '))
    q = int(stdinput())
    *M, = map(int, stdinput().split(' '))

    all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)])

    # print(A)
    # print(all_canditee)

    for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10
def check(m, a, A):
    for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
    return False

if __name__ == '__main__':
    main()
    # import cProfile
    # cProfile.run('main()') def stdinput():
    from sys import stdin
    return stdin.readline().strip() stdinput from sys import stdin return stdin.readline().strip() stdin.readline().strip() stdin.readline().strip stdin.readline() stdin.readline stdin readline strip def main():
    from itertools import combinations
    n = int(stdinput())
    *A, = map(int, stdinput().split(' '))
    q = int(stdinput())
    *M, = map(int, stdinput().split(' '))

    all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)])

    # print(A)
    # print(all_canditee)

    for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10 main from itertools import combinations n = int(stdinput()) n int(stdinput()) int stdinput() stdinput *A, = map(int, stdinput().split(' ')) *A A map(int, stdinput().split(' ')) map int stdinput().split(' ') ().split () stdinput split ' ' q = int(stdinput()) q int(stdinput()) int stdinput() stdinput *M, = map(int, stdinput().split(' ')) *M M map(int, stdinput().split(' ')) map int stdinput().split(' ') ().split () stdinput split ' ' sum(c) for i in range(1, n+1) for c in combinations(A, i) for i in range(1, n+1) for c in combinations(A, i) i range(1, n+1) range 1 n+1 n 1 for c in combinations(A, i) c combinations(A, i) combinations A i for c in combinations(A, i) sum(c) sum c all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)]) all_canditee set([sum(c) for i in range(1, n+1) for c in combinations(A, i)]) set [sum(c) for i in range(1, n+1) for c in combinations(A, i)] for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10 m M if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10 m in all_canditee m all_canditee print('yes') print 'yes' print('no') print 'no' def check(m, a, A):
    for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
    return False check for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
     i next_a enumerate(A) enumerate A this_a = a + next_a this_a a + next_a a next_a if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
     this_a == m this_a m return True True elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
     this_a < m this_a m if check(m, this_a, A[i+1:]):
                return True
     check(m, this_a, A[i+1:]) check m this_a A[i+1:] A i+1: i+1 i 1 return True True return False False m m a a A A if __name__ == '__main__':
    main()
    # import cProfile
    # cProfile.run('main()') __name__ == '__main__' __name__ '__main__' main() main def check(m, a, A):
    for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
    return False def check(m, a, A):
    for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
    return False check def main():
    from itertools import combinations
    n = int(stdinput())
    *A, = map(int, stdinput().split(' '))
    q = int(stdinput())
    *M, = map(int, stdinput().split(' '))

    all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)])

    # print(A)
    # print(all_canditee)

    for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10 def main():
    from itertools import combinations
    n = int(stdinput())
    *A, = map(int, stdinput().split(' '))
    q = int(stdinput())
    *M, = map(int, stdinput().split(' '))

    all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)])

    # print(A)
    # print(all_canditee)

    for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10 main def stdinput():
    from sys import stdin
    return stdin.readline().strip() def stdinput():
    from sys import stdin
    return stdin.readline().strip() stdinput
def stdinput():
    from sys import stdin
    return stdin.readline().strip()

def main():
    from itertools import combinations
    n = int(stdinput())
    *A, = map(int, stdinput().split(' '))
    q = int(stdinput())
    *M, = map(int, stdinput().split(' '))

    all_canditee = set([sum(c) for i in range(1, n+1) for c in combinations(A, i)])

    # print(A)
    # print(all_canditee)

    for m in M:
        if m in all_canditee:
            print('yes')
        else:
            print('no')

# can not pass 9/10
def check(m, a, A):
    for i, next_a in enumerate(A):
        this_a = a + next_a
        if this_a == m:
            return True
        elif this_a < m:
            if check(m, this_a, A[i+1:]):
                return True
    return False

if __name__ == '__main__':
    main()
    # import cProfile
    # cProfile.run('main()')
