import java.util.Scanner;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;

class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt();
    int N = sc.nextInt();
    ArrayList<Integer> A = new ArrayList<>();
    
    for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    }
    
    Collections.sort(A, Comparator.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    H -= A.get(i);
    }
    
    if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    }
    
  }
} import java.util.Scanner; Scanner java.util import java.util.ArrayList; ArrayList java.util import java.util.Comparator; Comparator java.util import java.util.Collections; Collections java.util class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt();
    int N = sc.nextInt();
    ArrayList<Integer> A = new ArrayList<>();
    
    for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    }
    
    Collections.sort(A, Comparator.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    H -= A.get(i);
    }
    
    if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    }
    
  }
} Main public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt();
    int N = sc.nextInt();
    ArrayList<Integer> A = new ArrayList<>();
    
    for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    }
    
    Collections.sort(A, Comparator.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    H -= A.get(i);
    }
    
    if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    }
    
  } main {
    
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt();
    int N = sc.nextInt();
    ArrayList<Integer> A = new ArrayList<>();
    
    for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    }
    
    Collections.sort(A, Comparator.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    H -= A.get(i);
    }
    
    if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    }
    
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int H = sc.nextInt(); H sc.nextInt() sc.nextInt sc int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc ArrayList<Integer> A = new ArrayList<>(); A new ArrayList<>() for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
    A.add(sc.nextInt());
    } {
    A.add(sc.nextInt());
    } A.add(sc.nextInt()) A.add A sc.nextInt() sc.nextInt sc Collections.sort(A, Comparator.reverseOrder()) Collections.sort Collections A Comparator.reverseOrder() Comparator.reverseOrder Comparator for (int i = 0; i < N; i++) {
    H -= A.get(i);
    } int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
    H -= A.get(i);
    } {
    H -= A.get(i);
    } H -= A.get(i) H A.get(i) A.get A i if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    } H <= 0 H 0 {
      System.out.print("Yes");
    } System.out.print("Yes") System.out.print System.out System System.out "Yes" {
      System.out.print("No");
    } System.out.print("No") System.out.print System.out System System.out "No" String[] args args
import java.util.Scanner;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.Collections;

class Main {
  public static void main(String[] args) {
    
    Scanner sc = new Scanner(System.in);
    int H = sc.nextInt();
    int N = sc.nextInt();
    ArrayList<Integer> A = new ArrayList<>();
    
    for (int i = 0; i < N; i++) {
    A.add(sc.nextInt());
    }
    
    Collections.sort(A, Comparator.reverseOrder());
    
    for (int i = 0; i < N; i++) {
    H -= A.get(i);
    }
    
    if (H <= 0) {
      System.out.print("Yes");
    } else {
      System.out.print("No");
    }
    
  }
}