#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cerr << name << " : " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long int pw(long long int a, long long int b) {
  long long int r = 1;
  for (long long int i = 0; i < b; i++) {
    r = ((r % 1000000007) * (a % 1000000007)) % 1000000007;
  }
  return r;
}
long long int power(long long int x, unsigned long long int y,
                    long long int p) {
  long long int res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
int gcd(int a, int b) {
  if (b == 0) return a;
  return gcd(b, a % b);
}
void solve() {
  long long int n, m, d;
  cin >> n >> m >> d;
  int c[m], sum = 0;
  for (long long int i = 0; i < m; i++) {
    cin >> c[i];
    sum += c[i];
  }
  int mz = (n - sum) / (m + 1);
  if ((n - sum) % (m + 1) != 0) mz++;
  __f("d, mz", d, mz);
  if (d <= mz) {
    cout << "NO";
    return;
  }
  cout << "YES" << endl;
  int nz = n - sum, cz = 0, ind = 1, count = 1;
  __f("mz, n, d, nz", mz, n, d, nz);
  for (long long int i = 0; i < n; i++) {
    __f("count, nz, cz", count, nz, cz);
    if (count > n) break;
    if (cz + 1 < d && nz > 0) {
      count++;
      cout << 0 << " ";
      cz++;
      nz--;
      continue;
    }
    cz = 0;
    count += c[ind - 1];
    for (int j = 0; j < c[ind - 1]; j++) {
      cout << ind << " ";
    }
    ind++;
    __f("count", count);
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  int t;
  t = 1;
  while (t--) solve();
  return 0;
}
