#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
int n, m, d;
int vis[N], res[N];
int ans[N];
int main(void) {
  cin >> n >> m >> d;
  int sum = 0;
  for (int i = 0; i < m; ++i) {
    scanf("%d", &vis[i]);
    sum += vis[i];
  }
  sum = n - sum;
  if (sum > (m + 1) * (d - 1))
    puts("NO");
  else {
    puts("YES");
    int x, y, l;
    if (sum <= m)
      x = 1, y = 0, l = sum;
    else
      x = sum / (m + 1), y = sum % (m + 1), l = m + 1;
    for (int i = 0; i < l; ++i)
      if (i < y)
        res[i] = x + 1;
      else
        res[i] = x;
    int t1 = 0, t2 = 0;
    for (int i = 0; i < n; ++i) {
      int flag = 0;
      if (t1 < l) i += res[t1] - 1, t1++, flag = 1;
      if (t2 < m) {
        if (flag) i++;
        for (int j = 0; j < vis[t2]; ++j) ans[i + j] = t2 + 1;
        i += vis[t2] - 1, t2++;
      }
    }
    for (int i = 0; i < n; ++i) printf("%d%c", ans[i], i + 1 == n ? '\n' : ' ');
  }
  return 0;
}
