import java.util.Scanner;
public class Main1 {
     public static void main(String[] args) {
Scanner kbScanner=new Scanner(System.in);
int H=kbScanner.nextInt();
int N=kbScanner.nextInt();
int[]  A=new int[];
for(int i=0;i<N;i++){
A[i]=kbScanner.nextInt();
}
boolean ret=false;
int sum=0;
for(int i=0;i<N;i++){
sum+=A[i];
}
if(sum>=H)
ret=true;
if(ret==true){
System.out.print("YES");
}else{
System.out.print("NO");
}
}
}