#include <bits/stdc++.h>
using namespace std;
long long n, m, d;
long long c[1111];
long long sum = 0;
long long res[1111];
int main() {
  cin >> n >> m >> d;
  for (int i = 0; i < n; i++) {
    cin >> c[i];
    sum += c[i];
  }
  long long curPos = 0;
  long long curPlatform = -1;
  long long lastPlatform = -1;
  long long cnt = 0;
  long long lastPlatformInd = 0;
  bool possible = 1;
  for (long long i = 1; i <= n; i++) {
    if (curPlatform != -1) {
      res[i] = curPlatform + 1;
      cnt--;
      if (!cnt) {
        curPlatform = -1;
      }
    } else {
      if (sum == n - i + 1 || i - d == lastPlatformInd) {
        if (lastPlatform == m - 1) {
          possible = 0;
          break;
        }
        curPlatform = lastPlatform + 1;
        lastPlatform = curPlatform;
        cnt = c[curPlatform];
        lastPlatformInd = i + cnt - 1;
        sum -= cnt;
        res[i] = curPlatform + 1;
        cnt--;
        if (!cnt) curPlatform = -1;
      }
    }
  }
  if (possible) {
    cout << "YES\n";
    for (int i = 1; i <= n; i++) cout << res[i] << " ";
  } else {
    cout << "NO";
  }
  cout << endl;
  return 0;
}
