#include <bits/stdc++.h>
using namespace std;
int n, m, d;
vector<int> plank, res;
vector<long long> sm;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> m >> d;
  plank.resize(m + 1);
  sm.resize(m + 1, 0);
  res.resize(n + 1, 0);
  for (int i = (int)(1); i <= (int)(m); ++i) {
    cin >> plank[i];
    sm[i] = sm[i - 1] + plank[i];
  }
  int curr = 0;
  for (int i = (int)(1); i <= (int)(m); ++i) {
    for (int j = d; j >= 1; --j) {
      if (curr + j + sm[m] - sm[i - 1] - 1 <= n) {
        curr += j + plank[i] - 1;
        for (int pos = curr, c = 0; c < plank[i]; ++c, --pos) res[pos] = i;
        break;
      }
    }
  }
  int c = 0;
  for (int i = 1; i <= n; ++i) {
    if (c >= d) {
      cout << "NO\n";
      return 0;
    }
    if (res[i] == 0)
      ++c;
    else
      c = 0;
  }
  if (c >= d) {
    cout << "NO\n";
    return 0;
  }
  cout << "YES\n";
  for (int i = 1; i <= n; ++i) cout << res[i] << " ";
  return 0;
}
