#include <bits/stdc++.h>
using namespace std;
int a[1009] = {0}, c[1003] = {0}, t[1003] = {0};
int main() {
  int n, m, d;
  cin >> n >> m >> d;
  int sum1 = 0;
  for (int i = 1; i <= m; ++i) {
    cin >> c[i];
    sum1 += c[i];
  }
  if (sum1 + (m + 1) * (d - 1) < n) {
    cout << "NO";
    return 0;
  }
  int pos = n;
  for (int i = m; i >= 1; --i) {
    int temp = c[i];
    while (temp) {
      temp--;
      pos--;
    }
    pos++;
    t[i] = pos--;
  }
  pos = 0;
  for (int i = 1; i <= m; ++i) {
    if (pos + d >= t[i]) {
      pos = t[i] + c[i] - 1;
    } else {
      t[i] = pos + d;
      pos = t[i] + c[i] - 1;
    }
  }
  for (int i = 1; i <= m; ++i) {
    for (int j = t[i]; j <= t[i] + c[i] - 1; ++j) a[j] = i;
  }
  cout << "YES\n";
  for (int i = 1; i <= n; ++i) cout << a[i] << "  ";
}
