#include <bits/stdc++.h>
using namespace std;
mt19937 gen(34);
int n, m, q, d, c[1001], pr[1002];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> n >> m >> d;
  int nn = n;
  for (int i = 1; i <= m; i++) {
    cin >> c[i];
    nn -= c[i];
  }
  while (nn) {
    bool ch = false;
    for (int i = 0; i <= m; i++)
      if (pr[i] + 1 < d) {
        nn--;
        pr[i]++;
        ch = true;
        if (nn == 0) break;
      }
    if (!ch && nn > 0) {
      cout << "NO";
      return 0;
    }
  }
  cout << "YES\n";
  for (int i = 0; i < pr[0]; i++) cout << "0 ";
  for (int i = 1; i <= m; i++) {
    for (int j = 0; j < c[i]; j++) cout << i << ' ';
    for (int j = 0; j < pr[i]; j++) cout << "0 ";
  }
  return 0;
}
