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

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	}
} import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	} main {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int H = Integer.parseInt(sc.next()); H Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc int N = Integer.parseInt(sc.next()); N Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc ArrayList<Integer> list = new ArrayList<>(); list new ArrayList<>() for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		} int i = 0; int i = 0; i 0 i < N i N i++ i++ i {
			list.add(Integer.parseInt(sc.next()));
		} {
			list.add(Integer.parseInt(sc.next()));
		} list.add(Integer.parseInt(sc.next())) list.add list Integer.parseInt(sc.next()) Integer.parseInt Integer sc.next() sc.next sc sc.close() sc.close sc Collections.sort(list, Collections.reverseOrder()) Collections.sort Collections list Collections.reverseOrder() Collections.reverseOrder Collections boolean check = false; check false for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		} int i = 0; int i = 0; i 0 i < list.size() i list.size() list.size list i++ i++ i {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		} {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		} H -= list.get(i) H list.get(i) list.get list i if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			} H <= 0 H 0 {
				check = true;
				break;
			} check = true check true break; {
				continue;
			} continue; System.out.println(check ? "Yes" : "No") System.out.println System.out System System.out check ? "Yes" : "No" check "Yes" "No" String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	}
} Main
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int H = Integer.parseInt(sc.next());
		int N = Integer.parseInt(sc.next());
		ArrayList<Integer> list = new ArrayList<>();
		for(int i = 0; i < N; i++) {
			list.add(Integer.parseInt(sc.next()));
		}
		sc.close();

		//必殺技を攻撃力が高い順にソート
		Collections.sort(list, Collections.reverseOrder());

		//判定フラグ
		boolean check = false;
		for(int i = 0; i < list.size(); i++) {
			H -= list.get(i);
			if(H <= 0) {
				check = true;
				break;
			}else {
				continue;
			}
		}
		System.out.println(check ? "Yes" : "No");
	}
}