#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m, d;
  cin >> n >> m >> d;
  int a[m], sum = 0;
  for (int i = 0; i < m; i++) cin >> a[i], sum += a[i];
  if ((m + 1) * (d - 1) + sum < n)
    cout << "NO" << endl;
  else {
    cout << "YES" << endl;
    for (int i = 0; i < m; i++) {
      if (sum == n) {
        for (int j = 0; j < a[i]; j++) cout << i + 1 << " ";
      } else {
        if (n - sum >= d - 1) {
          for (int j = 0; j < d - 1; j++) cout << "0 ";
          sum += d - 1;
        } else {
          for (int j = 0; j < n - sum; j++) cout << "0 ";
          sum = n;
        }
        for (int j = 0; j < a[i]; j++) cout << i + 1 << " ";
      }
    }
    for (int j = 0; j < n - sum; j++) cout << "0 ";
    cout << endl;
  }
}
