#include <cstdio>
#include <cmath>
#include <cstring>
#include <algorithm>
#include <queue>
#include <map>
#include <set>
#include <stack>
#include <string>
#include <iostream>
using namespace std;
const int maxn=int(1e3+10);
int money[maxn];
int main()
{
int n,m;
while(~scanf("%d%d",&n,&m))
{
for(int i=0;i<m;++i)
scanf("%d",money+i);
sort(money,money+m);
long long ans=money[0];
bool can=false;
for(int i=1;i<m;++i)
{
can=false;
if(money[i]>ans+1)break;
can=true;
ans+=money[i];
}
if(ans<n)can=false;
else can=true;
if( money[0] != 1 || can==false)printf("NO\n");
else printf("YES\n");
}
}