#include <bits/stdc++.h>
using namespace std;
void file() {}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  file();
  int testCases = 1;
  while (testCases--) {
    int n, m, d;
    cin >> n >> m >> d;
    vector<int> plat(m);
    int sum = 0;
    for (long long i = 0; i < m; i++) {
      cin >> plat[i];
      sum += plat[i];
    }
    int cur = 0;
    int dest = n + 1;
    int least = dest - d;
    int dif = least - sum;
    if (dif > (d - 1) * m) {
      cout << "NO";
      continue;
    }
    cout << "YES"
         << "\n";
    vector<int> ans(n + 1, 0);
    if (dif <= 0) {
      int cur = 1;
      int itr = 0;
      while (itr < m) {
        int l = cur, r = cur + plat[itr] - 1;
        for (long long i = l; i <= r; i++) {
          ans[i] = itr + 1;
        }
        cur += plat[itr];
        itr += 1;
      }
      reverse(ans.begin(), ans.end());
      ans.pop_back();
      reverse(ans.begin(), ans.end());
      for (auto it : ans) {
        cout << it << ' ';
      }
      continue;
    }
    int itr = 0;
    vector<pair<int, int>> range;
    while (sum < least) {
      int l, r;
      l = cur + d;
      r = l + plat[itr] - 1;
      range.push_back({l, r});
      cur = r;
      itr++;
      sum += d - 1;
    }
    while (itr < m) {
      int l = cur + 1, r = l + plat[itr] - 1;
      range.push_back({l, r});
      cur = r;
      itr++;
    }
    for (long long i = 0; i < m; i++) {
      int l = range[i].first, r = range[i].second;
      for (long long j = l; j <= r; j++) {
        ans[j] = i + 1;
      }
    }
    reverse(ans.begin(), ans.end());
    ans.pop_back();
    reverse(ans.begin(), ans.end());
    for (auto it : ans) {
      cout << it << ' ';
    }
  }
  return 0;
}
