3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
 
#include<stdio.h>
 
int n, A[2000];
 
int exhaustiveSearch(int i, int j){
  int more;
  /*?????????*/
  if(j == 0){
    return 1;
  }
  /*????????????*/
  else if(i >= n){
    return 0;
  }
  /*???????????????*/
  else{
    more  = exhaustiveSearch(i + 1, j) || exhaustiveSearch(i + 1, j - A[i]);
  }
  return more;
}
 
int main(){
  int i, q, Mi;
   
  scanf("%d", &n);
  for(i = 0; i < n; i++){
    scanf("%d", &A[i]);
  }
  scanf("%d", &q);
  for(i = 0; i < q; i++){
    scanf("%d", &Mi);
    if(exhaustiveSearch(0, Mi)){
      printf("yes\n");
    }
    else printf("no\n");
  }
   
  return 0;
}
 