#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int n, m, d;
  while (cin >> n >> m >> d) {
    int sum = 0;
    vector<int> ans(n + 2, 0);
    vector<int> c(m);
    for (int i = 0; i < m; ++i) {
      cin >> c[i];
      sum += c[i];
    }
    int plat = 0;
    int pos = 0;
    while (plat < m && pos <= n && n - (pos + d) + 1 > sum) {
      for (int i = 0; i < c[plat]; ++i) {
        ans[pos + d + i] = plat + 1;
      }
      sum -= c[plat];
      pos = pos + d + c[plat] - 1;
      c[plat] = 0;
      plat++;
    }
    int start = n;
    for (int i = m - 1; i >= 0; --i) {
      if (c[i] == 0) break;
      for (int j = 0; j < c[i]; ++j) ans[start--] = i + 1;
    }
    bool can = true;
    for (int i = n; i >= 1; --i) {
      if (ans[i]) {
        if (n + 1 - i > d) {
          can = false;
        }
        break;
      }
    }
    if (!can) {
      printf("NO\n");
      continue;
    }
    printf("YES\n");
    for (int i = 1; i < n + 1; ++i) {
      if (i > 1) putchar(' ');
      printf("%d", ans[i]);
    }
    putchar('\n');
  }
  return 0;
}
