import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    }
} import java.io.InputStream; InputStream java.io import java.io.PrintStream; PrintStream java.io import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    }
} Main public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    } main {
        solve(System.in, System.out);
    } solve(System.in, System.out) solve System.in System System.in System.out System System.out String[] args args static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    } solve {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    } Scanner scan = new Scanner(is); scan new Scanner(is) long H = scan.nextLong(); H scan.nextLong() scan.nextLong scan int N = scan.nextInt(); N scan.nextInt() scan.nextInt scan int A[] = new int[N]; A new int[N] N for(int i = 0; i < N; i++)
            A[i] = scan.nextInt(); int i = 0; int i = 0; i 0 i < N i N i++ i++ i A[i] = scan.nextInt(); A[i] = scan.nextInt() A[i] A i scan.nextInt() scan.nextInt scan Arrays.sort(A) Arrays.sort Arrays A for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        } int i = N-1; int i = N-1; i N-1 N 1 i >= 0 i 0 i-- i-- i {
            H -= A[i];
            if(H <= 0) break;
        } {
            H -= A[i];
            if(H <= 0) break;
        } H -= A[i] H A[i] A i if(H <= 0) break; H <= 0 H 0 break; if(H <= 0)
            os.println("Yes");
        else
            os.println("No"); H <= 0 H 0 os.println("Yes") os.println os "Yes" os.println("No") os.println os "No" InputStream is is PrintStream os os public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    }
} Main
import java.io.InputStream;
import java.io.PrintStream;
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        solve(System.in, System.out);
    }

    static void solve(InputStream is, PrintStream os) {
        // Your code here!
        Scanner scan = new Scanner(is);
        long H = scan.nextLong();
        int N = scan.nextInt();
        int A[] = new int[N];
        for(int i = 0; i < N; i++)
            A[i] = scan.nextInt();

        Arrays.sort(A);
        for(int i = N-1; i >= 0; i--){
            H -= A[i];
            if(H <= 0) break;
        }

        if(H <= 0)
            os.println("Yes");
        else
            os.println("No");
    }
}