#pragma GCC optimize(3)
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
const int N=2e3+5;
const int mod=998244353;
int n,m,d;
int a[N],c[N];
int main()
{
scanf("%d%d%d",&n,&m,&d);
int sum=0;
for(int i=1; i<=m; i++)
scanf("%d",&a[i]),sum+=a[i];
int x=n-sum;
if(ceil(x*1.0/(d-1))>m+1)printf("NO\n");
else
{
int k=ceil(x*1.0/(m+1))+1;
int t;
int l=0,p=1;
while(l<n+1)
{
if(p>m)break;
if(x==0)t=1;
else t=min(x+1,k);
x-=(t-1);
for(int i=l+t;i<l+t+a[p];i++)
c[i]=p;
l=l+t+a[p]-1;
p++;
}
cout<<"YES"<<endl;
for(int i=1;i<n;i++)
printf("%d ",c[i]);
printf("%d\n",c[n]);
}
return 0;
}