#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[] = {1, 0, -1, 0, 1, -1, 1, -1};
long long fix_mod(long long x, long long y) { return (y + x % y) % y; }
void fast() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
}
int n, m, d;
int main() {
  fast();
  cin >> n >> m >> d;
  vector<int> v(m), ans(n + 1, 0);
  int sum = 0;
  for (int i = 0; i < m; i++) cin >> v[i], sum += v[i];
  sum = n - sum;
  vector<int> vv;
  if (sum && d == 1)
    return cout << "NO"
                << "\n",
           0;
  ;
  while (sum) {
    vv.push_back(min(d - 1, sum));
    sum -= min(d - 1, sum);
  }
  int x = 1, idx = 0, kk = 1;
  if (vv.size() > v.size() + 1)
    return cout << "NO"
                << "\n",
           0;
  ;
  for (int i = 0; i < vv.size(); i++) {
    while (vv[i]--) {
      ans[x++] = 0;
    }
    while (idx < m && v[idx]--) {
      ans[x++] = kk;
    }
    kk++;
    idx++;
  }
  for (; idx < m; idx++) {
    while (v[idx]--) ans[x++] = kk;
    kk++;
  }
  cout << "YES"
       << "\n";
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
