#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const vector<int> mods = {998244353, 1000000007, 1000000009};
const long long inf = 3e18;
const double pi = acos(-1.0);
const double eps = 0.0000001;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
template <class... K>
using umap = unordered_map<K...>;
template <class... K>
using uset = unordered_set<K...>;
long long n, m, d, t;
vector<long long> c;
umap<long long, long long> res;
int main() {
  cin.sync_with_stdio(0);
  cin.tie(0);
  cout.precision(13);
  cin >> n >> m >> d;
  c.resize(m + 1);
  for (long long i = (0); i < (m); ++i) {
    cin >> c[i];
    t += c[i];
  }
  t = n - t;
  c[m++] = 1;
  long long ds = 0;
  for (long long i = (0); i < (m); ++i) {
    long long jmp = min(d - 1, t);
    t -= jmp;
    for (long long j = (ds + jmp + 1); j < (ds + jmp + 1 + c[i]); ++j)
      res[j] = i + 1;
    ds = ds + jmp + c[i];
    if (ds >= n + 1) {
      cout << "YES\n";
      for (long long i = (1); i < (n + 1); ++i) cout << res[i] << " \n"[i == n];
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
