#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  ;
  int n, m, d;
  cin >> n >> m >> d;
  vector<int> arr(m);
  int sum = 0;
  for (int i = 0; i < m; i++) {
    cin >> arr[i];
    sum += arr[i];
  }
  int gap = (m + 1) * (d - 1);
  sum = n - sum;
  if (sum > gap) {
    cout << "NO" << '\n';
    return 0;
  }
  cout << "YES" << '\n';
  int siz = 0;
  int rem = sum;
  int curr = 0;
  for (int i = 0; i < n; i++) {
    if (rem == 0 || siz == (d - 1)) {
      for (int j = 0; j < arr[curr]; j++) {
        cout << curr + 1 << " ";
        i++;
      }
      i--;
      curr++;
      siz = 0;
    } else {
      cout << 0 << " ";
      siz++;
      rem--;
    }
  }
  return 0;
}
