def create_sums(ns):
    if len(ns) == 0:
        return set()

    s = create_sums(ns[1:])
    return {e + ns[0] for e in s} | s | {ns[0]}


def run_set():
    _ = int(input())  # flake8: noqa
    ns = [int(i) for i in input().split()]

    sums = create_sums(ns)
    _ = int(input())  # flake8: noqa

    for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    run_set()

 def create_sums(ns):
    if len(ns) == 0:
        return set()

    s = create_sums(ns[1:])
    return {e + ns[0] for e in s} | s | {ns[0]} create_sums if len(ns) == 0:
        return set()

     len(ns) == 0 len(ns) len ns 0 return set() set() set s = create_sums(ns[1:]) s create_sums(ns[1:]) create_sums ns[1:] ns 1: 1 e + ns[0] for e in s for e in s e s for e in s e + ns[0] e ns[0] ns 0 return {e + ns[0] for e in s} | s | {ns[0]} {e + ns[0] for e in s} | s | {ns[0]} {e + ns[0] for e in s} | s s {ns[0]} ns ns def run_set():
    _ = int(input())  # flake8: noqa
    ns = [int(i) for i in input().split()]

    sums = create_sums(ns)
    _ = int(input())  # flake8: noqa

    for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no") run_set _ = int(input()) _ int(input()) int input() input int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i ns = [int(i) for i in input().split()] ns [int(i) for i in input().split()] sums = create_sums(ns) sums create_sums(ns) create_sums ns _ = int(input()) _ int(input()) int input() input for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no") q (int(j) for j in input().split()) if q in sums:
            print("yes")
        else:
            print("no") q in sums q sums print("yes") print "yes" print("no") print "no" if __name__ == '__main__':
    run_set() __name__ == '__main__' __name__ '__main__' run_set() run_set def create_sums(ns):
    if len(ns) == 0:
        return set()

    s = create_sums(ns[1:])
    return {e + ns[0] for e in s} | s | {ns[0]} def create_sums(ns):
    if len(ns) == 0:
        return set()

    s = create_sums(ns[1:])
    return {e + ns[0] for e in s} | s | {ns[0]} create_sums def run_set():
    _ = int(input())  # flake8: noqa
    ns = [int(i) for i in input().split()]

    sums = create_sums(ns)
    _ = int(input())  # flake8: noqa

    for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no") def run_set():
    _ = int(input())  # flake8: noqa
    ns = [int(i) for i in input().split()]

    sums = create_sums(ns)
    _ = int(input())  # flake8: noqa

    for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no") run_set
def create_sums(ns):
    if len(ns) == 0:
        return set()

    s = create_sums(ns[1:])
    return {e + ns[0] for e in s} | s | {ns[0]}


def run_set():
    _ = int(input())  # flake8: noqa
    ns = [int(i) for i in input().split()]

    sums = create_sums(ns)
    _ = int(input())  # flake8: noqa

    for q in (int(j) for j in input().split()):
        if q in sums:
            print("yes")
        else:
            print("no")


if __name__ == '__main__':
    run_set()


