#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
import time
import sys
import io
import re
import math
start = time.clock()
i = 0

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.stdin.readline().split()]
ans=set([0])
for i in a:
    ans|=set(j+i for j in ans)
ans=list(ans)
for jk in ms:
    if jk in ans: print('yes')
    else: print('no') from __future__ import print_function,division import time time import sys sys import io io import re re import math math start = time.clock() start time.clock() time.clock time clock i = 0 i 0 sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(s) for s in sys.stdin.readline().split() for s in sys.stdin.readline().split() s sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for s in sys.stdin.readline().split() int(s) int s a=[int(s) for s in sys.stdin.readline().split()] a [int(s) for s in sys.stdin.readline().split()] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline int(s) for s in sys.stdin.readline().split() for s in sys.stdin.readline().split() s sys.stdin.readline().split() sys.stdin.readline().split sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline split for s in sys.stdin.readline().split() int(s) int s ms=[int(s) for s in sys.stdin.readline().split()] ms [int(s) for s in sys.stdin.readline().split()] ans=set([0]) ans set([0]) set [0] 0 for i in a:
    ans|=set(j+i for j in ans) i a ans|=set(j+i for j in ans) ans set(j+i for j in ans) set j+i j i ans=list(ans) ans list(ans) list ans for jk in ms:
    if jk in ans: print('yes')
    else: print('no') jk ms if jk in ans: print('yes')
    else: print('no') jk in ans jk ans start = time.clock() time.clock() start a=[int(s) for s in sys.stdin.readline().split()] [int(s) for s in sys.stdin.readline().split()] a i = 0 0 i ms=[int(s) for s in sys.stdin.readline().split()] [int(s) for s in sys.stdin.readline().split()] ms ans=set([0]) set([0]) ans ans|=set(j+i for j in ans) set(j+i for j in ans) ans ans=list(ans) list(ans) ans
#!/usr/bin/env python
# -*- coding:utf-8 -*-
from __future__ import print_function,division
import time
import sys
import io
import re
import math
start = time.clock()
i = 0

sys.stdin.readline()
a=[int(s) for s in sys.stdin.readline().split()]
sys.stdin.readline()
ms=[int(s) for s in sys.stdin.readline().split()]
ans=set([0])
for i in a:
    ans|=set(j+i for j in ans)
ans=list(ans)
for jk in ms:
    if jk in ans: print('yes')
    else: print('no')