function bigRemove(x,y){
   var a=(x+"").split("").reverse().map(Number);
   var b=(y+"").split("").reverse().map(Number);
   while(a.length!=b.length)b.push(0);
   var c=[];
   var flag=[];
   for(var i=0;i<a.length;i++)flag[i]=0;
   for(var i=0;i<a.length;i++){
      if(a[i]-flag[i]-b[i]<0){c[i]=10+a[i]-flag[i]-b[i];flag[i+1]++;}
      else c[i]=a[i]-flag[i]-b[i];
   }
   var str=c.reverse().join("");
   return str.replace(/^0+/,"");
}

var input = require('fs').readFileSync('/dev/stdin', 'utf8');
var arr=input.trim().split("\n");
var n=arr.shift()-0;
var a=arr.shift().split(" ").map(Number);
var m=arr.shift()-0;
var b=arr.shift().split(" ").map(Number);
var c=arr.shift().split(" ");
var cnt=0;
b.forEach(function(v,i){
   var sum=0;
   a.forEach(function(V){
      if(v>=V)sum+=V;
      if(sum>1000000000){sum-=1000000000;cnt++;}
   });
   while(true){
      if(cnt==0)break;
      c[i]=bigRemove(c[i],1000000000);
      cnt--;
   }
   console.log((sum>=c[i]-0)?"Yes":"No");
});