#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int maxn = 1e3 + 10;
int n, m, d;
int c[maxn];
int ans[maxn];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m >> d;
  int tot = 0;
  for (int i = 1; i <= m; i++) cin >> c[i], tot += c[i];
  if (tot + (m + 1) * (d - 1) < n) {
    cout << "NO" << endl;
    return 0;
  }
  cout << "YES" << endl;
  int res = n - tot;
  int idx;
  if (d - 1 >= res) {
    idx = res + 1;
    res = 0;
  } else {
    res -= (d - 1);
    idx = d;
  }
  for (int i = 1; i <= m; i++) {
    for (int j = 1; j <= c[i]; j++) {
      ans[idx] = i;
      idx++;
    }
    tot -= c[i];
    if (n - idx + 1 >= tot) {
      res = n - idx + 1 - tot;
      if (res >= d - 1) {
        int temp = d - 1;
        while (temp) {
          idx++;
          temp--;
        }
      } else {
        int temp = res;
        while (temp) {
          idx++;
          temp--;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
