program main
   implicit none
   integer i,h,n,a_max_val,a_max_loc(1),answer
   integer,allocatable :: a(:)
   
   answer=0
   
   read(*,*) h,n
   allocate(a(n))
   read(*,*) (a(i),i=1,n)
   do i=1,n
      a_max_val=maxval(a)
      a_max_loc=maxloc(a)
      h=h-a_max_val
      a(a_max_loc(1))=0
      if (h<=0) then
         answer = 1
         exit
      end if
   end do
   
   if (answer==1) then
      write(*,'(a)') 'Yes'
   else
      write(*,'(a)') 'No'
   endif
end program main