n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
memory = [[-1 for i in range(max(m)+1)]for j in range(n)]

def f(i, m):
    if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res

for k in m:
    print('yes' if f(0, k) else 'no')
 n = int(input()) n int(input()) int input() input a = list(map(int, input().split())) a list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split q = int(input()) q int(input()) int input() input m = list(map(int, input().split())) m list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split [-1 for i in range(max(m)+1)]for j in range(n) for j in range(n) j range(n) range n for j in range(n) [-1 for i in range(max(m)+1)] memory = [[-1 for i in range(max(m)+1)]for j in range(n)] memory [[-1 for i in range(max(m)+1)]for j in range(n)] def f(i, m):
    if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res f if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res m == 0 m 0 return 1 1 elif i >= n:
        return 0
     i >= n i n return 0 0 elif memory[i][m] != -1:
        return memory[i][m]
     memory[i][m] != -1 memory[i][m] [i] memory i m -1 return memory[i][m] memory[i][m] [i] memory i m elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
     m - a[i] >= 0 m - a[i] m a[i] a i 0 res0 = f(i+1, m) res0 f(i+1, m) f i+1 i 1 m res1 = f(i+1, m-a[i]) res1 f(i+1, m-a[i]) f i+1 i 1 m-a[i] m a[i] a i if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
     res0 or res1 res0 res1 memory[i][m] = 1 memory[i][m] [i] memory i m 1 return 1 1 memory[i][m] = 0 memory[i][m] [i] memory i m 0 return 0 0 res = f(i+1, m) res f(i+1, m) f i+1 i 1 m memory[i][m] = res memory[i][m] [i] memory i m res return res res i i m m for k in m:
    print('yes' if f(0, k) else 'no') k m print('yes' if f(0, k) else 'no') print 'yes' if f(0, k) else 'no' f(0, k) f 0 k 'yes' 'no' def f(i, m):
    if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res def f(i, m):
    if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res f q = int(input()) int(input()) q memory = [[-1 for i in range(max(m)+1)]for j in range(n)] [[-1 for i in range(max(m)+1)]for j in range(n)] memory n = int(input()) int(input()) n a = list(map(int, input().split())) list(map(int, input().split())) a m = list(map(int, input().split())) list(map(int, input().split())) m
n = int(input())
a = list(map(int, input().split()))
q = int(input())
m = list(map(int, input().split()))
memory = [[-1 for i in range(max(m)+1)]for j in range(n)]

def f(i, m):
    if m == 0:
        return 1
    elif i >= n:
        return 0
    elif memory[i][m] != -1:
        return memory[i][m]
    elif m - a[i] >= 0:
        res0 = f(i+1, m)
        res1 = f(i+1, m-a[i])
        if res0 or res1:
            memory[i][m] = 1
            return 1
        else:
            memory[i][m] = 0
            return 0
    else:
        res = f(i+1, m)
        memory[i][m] = res
        return res

for k in m:
    print('yes' if f(0, k) else 'no')

