#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 10;
void solve() {
  int n, m, d;
  cin >> n >> m >> d;
  vector<int> a(m);
  int sum = 0;
  for (int i = 0; i < m; i++) {
    cin >> a[i];
    sum += a[i];
  }
  if (n - sum > (d - 1) * (m + 1)) {
    cout << "NO";
    return;
  }
  cout << "YES\n";
  int Nzero = n - sum, j = 0;
  for (int i = 0; i < n;) {
    int x = a[j];
    int y = d - 1;
    while (y > 0 && Nzero > 0) {
      cout << 0 << " ";
      i++;
      y--;
      Nzero--;
    }
    while (j < m && x > 0) {
      cout << j + 1 << " ";
      i++;
      x--;
    }
    j++;
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int tt = 1;
  for (int i = 1; i <= tt; i++) {
    solve();
  }
  return 0;
}
