#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, m, d, c, suma = 0;
  cin >> n >> m >> d;
  vector<long long> v;
  for (long long i = 0; i < m; i++) {
    cin >> c;
    suma += c;
    v.push_back(-c);
  }
  long long pos = -1;
  vector<long long> answer(n, 0);
  for (long long i = 0; i < m; i++) {
    long long aux = n - suma;
    if (pos + d < aux) {
      pos += d;
      answer[pos] = i + 1;
      for (long long j = pos + 1; j < pos - v[i]; j++) {
        answer[j] = i + 1;
      }
      pos += -v[i] - 1;
      suma += v[i];
    } else {
      pos = aux;
      answer[pos] = i + 1;
      for (long long j = pos + 1; j < pos - v[i]; j++) {
        answer[j] = i + 1;
      }
      pos += -v[i] - 1;
      suma += v[i];
    }
  }
  if (pos + d >= n) {
    cout << "YES\n";
    for (long long i = 0; i < n; i++) {
      cout << answer[i] << " ";
    }
  } else {
    cout << "NO\n";
  }
  return 0;
}
