var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr=input.trim().split("\n");
arr.shift();
var a=arr.shift().split(" ").map(Number);
a.sort(function(a,b){return a-b;});
arr.shift();
var b=arr.shift().split(" ").map(Number);
var c=arr.shift().split(" ");
var ary=[];
for(var i=0;i<=1000000;i++)ary[i]=false;
ary[0]=0;
var s=[0,0];
a.forEach(function(v){
   s[1]+=v;
   if(s[1]>=1000000000000000){
      s[0]++;
      s[1]-=1000000000000000;
   }
   ary[v]=[s[0],s[1]];
});
b.forEach(function(v,i){
   while(true){
      if(ary[v]!==false)break;
      v--;
   }
   var str=c[i];
   var cc=[str.slice(0,-15)-0,str.slice(-15)-0];
   if(cc[0]<ary[v][0])console.log("Yes");
   else if(cc[0]==ary[v][0] && cc[1]<=ary[v][1])console.log("Yes");
   else console.log("No");
});