#include <bits/stdc++.h>
using namespace std;
int n, m, d, v[1111], nrPlat = 1;
int lgPlat[1111];
int main() {
  cin >> n >> m >> d;
  int s = 0, contor = 0, start = 0;
  for (int i = 1; i <= m; i++) {
    ++contor;
    cin >> lgPlat[i];
    s += lgPlat[i];
    for (int j = start + 1, nr = 1; nr <= lgPlat[i]; j++) {
      v[j] = contor;
      start = j;
      nr++;
    }
  }
  int finish = n + 1;
  while (finish >= 1) {
    if ((finish - d <= 0) || v[finish - d] != 0) {
      break;
    } else {
      if (m > 0) {
        for (int i = s, lg = lgPlat[m]; lg > 0 && i >= 1; i--) {
          --s;
          v[i] = 0;
          --lg;
        }
        for (int i = finish - d; i >= 1, lgPlat[m] > 0; i--) {
          v[i] = m;
          --lgPlat[m];
          finish = i;
        }
        --m;
      } else {
        cout << "NO";
        return 0;
      }
    }
  }
  cout << "YES\n";
  for (int i = 1; i <= n; i++) {
    cout << v[i] << " ";
  }
  return 0;
}
