#include<stdio.h>
char solve(int,int);
int n,q,i,j;
int a[2000],m[2000];
int main(){
  char h;
  scanf("%d",&n);
  for(i=0;i<n;i++){
    scanf("%d",&a[i]);
  }
  scanf("%d",&q);
  for(i=0;i<q;i++){
    scanf("%d",&m[i]);
  }
  for(i=0;i<q;i++){
    h=solve(i,m[i]);
    printf("%c\n",h);
    if(h=='t'){
      printf("yes\n");
    }
    else{
      printf("no\n");
    }
  }
  return 0;
}
char solve(int c,int b){
  char res;
  if(b==0){
    return 't';
  }
  if(c>=b){
    return 'f';
  }
  if(solve(c+1,b)=='t' || solve(c+1,b-a[c])=='t'){
    res='t';
  }
  else{
    res='f';
  }
  return res;
}

