#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<ll, ll>;
const ll MOD = 1e9 + 7, N = 1e5 + 10;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ll n, m, d;
  cin >> n >> m >> d;
  vector<ll> a(m);
  ll sm = 0;
  for (ll i = 0; i < m; i++) {
    cin >> a[i];
    sm += a[i];
  }
  vector<ll> ans(n);
  bool is_pos = true;
  ll cur = -1;
  ll ind = 0, j = 0, val = n - sm;
  is_pos = is_pos && ((d - 1) * (m + 1) + sm < n);
  if (!is_pos) {
    cout << "YES\n";
    while (ind != n) {
      ll dist = min(val, d - 1);
      ll ff = dist;
      while (dist--) {
        if (ind == n) break;
        ans[ind] = 0;
        ind++;
      }
      ll to = a[j];
      while (to--) {
        if (ind == n) break;
        ans[ind] = j + 1;
        ind++;
      }
      j++;
      val -= ff;
    }
    for (ll i = 0; i < n; i++) {
      cout << ans[i] << ' ';
    }
    cout << '\n';
  } else {
    cout << "NO\n";
  }
  return 0;
}
