#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long maxn = 2e5 + 5;
long long id[10010];
long long l[10010];
long long ans[10010];
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, m, d;
  cin >> n >> m >> d;
  long long tot = 0;
  for (long long i = 0; i < m; ++i) {
    cin >> l[i + 1];
    tot += l[i + 1];
  }
  l[0] = 1;
  for (long long i = 1; i <= m + 1; ++i) {
    long long x = id[i - 1] + l[i - 1] - 1;
    if (i == m + 1) {
      if (x + d <= n) {
        cout << "NO" << '\n';
        ;
        return 0;
      }
      break;
    }
    long long temp = min(x + d, n - tot + 1);
    id[i] = temp;
    tot -= l[i];
  }
  cout << "YES" << '\n';
  ;
  for (long long i = 1; i <= m; ++i) {
    for (long long j = id[i]; j <= id[i] + l[i] - 1; ++j) {
      ans[j] = i;
    }
  }
  for (long long i = 1; i <= n; ++i) {
    cout << ans[i] << " ";
  }
  cout << '\n';
  ;
  return 0;
}
