#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m, d;
  cin >> n >> m >> d;
  vector<long long int> v(m), pre(m + 1, 0);
  for (long long int i = 0; i < m; i++) {
    cin >> v[i];
  }
  pre[m] = 0;
  for (long long int i = m - 1; i >= 0; i--) {
    if (i == m - 1)
      pre[i] = v[i];
    else
      pre[i] = pre[i + 1] + v[i];
  }
  if (n > pre[0] + (m + 1) * (d - 1)) {
    cout << "NO\n";
    return 0;
  }
  long long int j = 0;
  long long int i = 0;
  vector<long long int> res(n + 1, 0);
  while (i < n + 1) {
    long long int k = i + 1;
    while (i + 1 < k + d - 1 && n - i > pre[j]) {
      res[i + 1] = 0;
      i++;
    }
    i++;
    k = i + v[j];
    while (i < k) {
      res[i] = j + 1;
      i++;
    }
    if (i >= n + 1) break;
    j++;
    if (j >= m) break;
    i--;
  }
  cout << "YES\n";
  for (long long int i = 1; i <= n; i++) cout << res[i] << " ";
  cout << endl;
  return 0;
}
