function main(input) {
  
   const input = arg.trim().split("\n");

    const health = parseInt(input[0].split(" ")[0]);
    const numberOfMoves = parseInt(input[0].split(" ")[1]);
    const attacts = input[1].split(" ").map(n=>parseInt(n));

  	int count = 0;
  	int index = 0;
  	while(health >= 0){
      count++;
		if( index >= attacts.length){
        	index = 0;        	
        }
	    health = health - attacts[index];
    }
  
  	if(count > numberOfMoves){
    	console.log("yes");
    }else{
    	console.log("no");
    }
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'));