#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#pragma comment(linker, "/STACK:1024000000,1024000000")
using namespace std;
long long x, y, z, a, sum, indx = 0, last = -1;
vector<long long> q, p(1005);
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  ;
  cin >> x >> y >> z;
  for (int i = 0; i < y; i++) {
    cin >> a;
    q.push_back(a);
    sum += a;
  }
  for (int i = 0; i < x; i++) {
    if (sum + i == x) {
      for (int j = indx; j < y; j++) {
        while (q[j] > 0) {
          p[i++] = j + 1;
          q[j]--;
        }
      }
      last = x;
      break;
    }
    if (i - last == z && indx < y) {
      long long l = i + q[indx];
      while (i < l) {
        p[i++] = indx + 1;
      }
      sum -= q[indx];
      last = --i;
      indx++;
    }
  }
  if (last + z < x) {
    cout << "NO" << endl;
  } else {
    cout << "YES" << endl;
    for (int i = 0; i < x; i++) {
      cout << p[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
