import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    }
} import java.util.Arrays; Arrays 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){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    }
} Main public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    } main {
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    } try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        } {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String[] line = sc.nextLine().split(" "); line sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " String[] dList = sc.nextLine().split(" "); dList sc.nextLine().split(" ") sc.nextLine().split sc.nextLine() sc.nextLine sc " " Arrays.sort(dList,  Collections.reverseOrder()) Arrays.sort Arrays dList Collections.reverseOrder() Collections.reverseOrder Collections int h = Integer.valueOf(line[0]); h Integer.valueOf(line[0]) Integer.valueOf Integer line[0] line 0 for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            } String d dList {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            } {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            } h -= Integer.valueOf(d) h Integer.valueOf(d) Integer.valueOf Integer d if (h <= 0) {
                    System.out.println("Yes");
                    return;
                } h <= 0 h 0 {
                    System.out.println("Yes");
                    return;
                } System.out.println("Yes") System.out.println System.out System System.out "Yes" return; System.out.println("No") System.out.println System.out System System.out "No" String[] args args public class Main {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    }
} public class Main {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    }
} Main
import java.util.Arrays;
import java.util.Collections;
import java.util.Scanner;
public class Main {
    public static void main(String[] args){
        try(Scanner sc = new Scanner(System.in) ) {
            String[] line = sc.nextLine().split(" ");
            String[] dList = sc.nextLine().split(" ");

            Arrays.sort(dList,  Collections.reverseOrder());

            int h = Integer.valueOf(line[0]);

            for (String d : dList) {
                h -= Integer.valueOf(d);

                if (h <= 0) {
                    System.out.println("Yes");
                    return;
                }
            }

            // 出力
            System.out.println("No");
        }
    }
}