#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, d;
  cin >> n >> m >> d;
  vector<int> c(m);
  for (int i = 0; i < m; i++) cin >> c[i];
  int sum = 0;
  for (int i = 0; i < m; i++) sum += c[i];
  int st = 0;
  for (int i = 0; i < m; i++) {
    st += (d - 1 + c[i]);
  }
  st += (d);
  if (st > n) {
    sum = n - sum;
    vector<int> ans(n, 0);
    int tem = d - 1;
    int j = 0;
    for (int i = 0; i < m; i++) {
      tem = min(tem, sum);
      sum -= tem;
      j += (tem);
      for (int k = 0; k < c[i]; k++) {
        ans[j] = i + 1;
        j++;
      }
    }
    cout << "YES" << endl;
    for (int i = 0; i < n; i++) cout << ans[i] << " ";
    cout << endl;
  } else {
    cout << "NO" << endl;
  }
}
