#include<cstdio>
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;

int main()
{
  freopen("dinner.in", "r", stdin);
  freopen("dinner.out", "w", stdout);
  int k, n;
  cin >> k >> n;
  vector<int> a(n);
  for(int i = 0; i < n; i++)
    cin >> a[i];
  sort(a.begin(), a.end());
  int sum = 0;
  bool flag = false;
  for(int i = n - 1; i > 0 && !flag; i--)
  {
    sum += a[i];
    if(sum > k)
      flag = true;
  }
  cout << (flag ? "YES" : "NO") << endl; 
  return 0;
}

