#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, m, d;
  cin >> n >> m >> d;
  vector<long long int> plat(m);
  for (long long int i = 0; i < (m); i++) {
    cin >> plat[i];
  }
  vector<long long int> suff(m + 1);
  for (long long int i = m - 1; i >= (0); i--) {
    suff[i] = plat[i] + suff[i + 1];
  }
  long long int pos = 0, l = 0;
  vector<long long int> ans(n + 2);
  while (pos < n + 1) {
    long long int next = min(pos + d, n - suff[l] + 1);
    if (pos + d <= n && suff[l] == 0) {
      cout << "NO" << endl;
      return;
    }
    if (pos + d > n && suff[l] == 0) {
      break;
    }
    ans[next] += (l + 1);
    ans[next + plat[l]] -= (l + 1);
    pos = next + plat[l] - 1;
    l++;
  }
  for (long long int i = 1; i < (n + 1); i++) {
    ans[i] += ans[i - 1];
  }
  cout << "YES" << endl;
  for (long long int i = 1; i < (n + 1); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
int main() {
  long long int t;
  t = 1;
  while (t--) {
    solve();
  }
}
