#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e6 + 20;
const long long mod = 1e9 + 7;
int a[MAXN], b[MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  int n, m, d, sum = 0, sum1 = 0;
  cin >> n >> m >> d;
  for (int i = 1; i <= m; ++i) {
    cin >> a[i];
    sum1 += a[i];
    sum += d + a[i] - 1;
  }
  if (sum + d < n + 1)
    cout << "NO";
  else {
    cout << "YES" << endl;
    int cnt = 1, l = d, r = d + a[cnt] - 1;
    for (int i = 1; i <= n; ++i) {
      if (i >= l && i <= r) {
        b[i] = cnt;
        sum1--;
        if (i == r) {
          cnt++;
          l = r + d;
          r += d + a[cnt] - 1;
        }
      }
    }
    cnt = m;
    int i = n, cnt1 = 0;
    while (sum1) {
      if (b[i] > 0) sum1++;
      b[i] = cnt;
      sum1--;
      cnt1++;
      i--;
      if (cnt1 == a[cnt]) cnt--, cnt1 = 0;
    }
    for (int i = 1; i <= n; ++i) cout << b[i] << " ";
  }
}
