#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
const int M = 1e6 + 10;
const int INF = 0x3f3f3f3f;
const int MOD = 1e9 + 7;
int a[N], ans[N];
void solve() {
  int n, m, d;
  cin >> n >> m >> d;
  for (long long i = 1; i < m + 1; i++) cin >> a[i];
  int sum = 0;
  for (long long i = 1; i < m + 1; i++) sum += a[i];
  if (sum + (m + 1) * (d - 1) < n) {
    cout << "NO" << endl;
    return;
  }
  int pos = 0;
  for (long long i = 1; i < m + 1; i++) {
    if (pos + sum + d - 1 < n + 1)
      pos += d;
    else
      pos = n + 1 - sum;
    for (long long j = pos; j < pos + a[i]; j++) ans[j] = i;
    pos += a[i] - 1;
    sum -= a[i];
  }
  bool flag = true;
  int last = 0;
  for (long long i = 1; i < n + 1; i++) {
    if (ans[i]) {
      if (i - last > d) flag = false;
      last = i;
    }
  }
  cout << "YES" << endl;
  for (long long i = 1; i < n + 1; i++) cout << ans[i] << ' ';
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  solve();
  return 0;
}
