import sys
readline = sys.stdin.readline
readline()
bits = 1
for a in map(int, readline().split()): bits |= bits << a
readline()
sys.stdout.write("\n".join("yes"*((bits >> q) & 1)or"no" for q in map(int, readline().split())))
sys.stdout.write("\n") import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readline() readline bits = 1 bits 1 for a in map(int, readline().split()): bits |= bits << a a map(int, readline().split()) map int readline().split() ().split () readline split readline() readline sys.stdout.write("\n".join("yes"*((bits >> q) & 1)or"no" for q in map(int, readline().split()))) sys.stdout.write sys.stdout sys stdout write "\n".join("yes"*((bits >> q) & 1)or"no" for q in map(int, readline().split())) "\n".join "\n" join "yes"*((bits >> q) & 1)or"no" "yes"*((bits >> q) & 1) "yes" (bits >> q) & 1 bits >> q bits q 1 "no" sys.stdout.write("\n") sys.stdout.write sys.stdout sys stdout write "\n" bits = 1 1 bits readline = sys.stdin.readline sys.stdin.readline readline
import sys
readline = sys.stdin.readline
readline()
bits = 1
for a in map(int, readline().split()): bits |= bits << a
readline()
sys.stdout.write("\n".join("yes"*((bits >> q) & 1)or"no" for q in map(int, readline().split())))
sys.stdout.write("\n")