#include <bits/stdc++.h>
const long long INF32 = 1e9;
const long long INF64 = 1e17;
const int RANGE = 1e6 + 5;
using namespace std;
template <class T>
void read(T &Val) {
  T tmp = 0;
  char ch = getchar();
  int flag = 1;
  while (!(ch >= '0' && ch <= '9')) {
    if (ch == '-') flag = -1;
    ch = getchar();
  }
  while ((ch >= '0' && ch <= '9')) {
    tmp = tmp * 10 + ch - '0';
    ch = getchar();
  }
  Val = flag * tmp;
}
int ans[RANGE];
int main() {
  vector<int> keep;
  int n, m, d;
  read(n), read(m), read(d);
  int jump = d - 1, sum = 0;
  for (int i = 0; i < m; i++) {
    int a;
    read(a);
    keep.push_back(a);
    sum += a;
  }
  if (sum > n or sum + jump * (1 + m) < n) return cout << "NO", 0;
  sum = sum + min(n - sum, jump);
  int val = n - sum - jump;
  int hold = 0;
  for (int i = (int)(keep).size() - 1; i >= 0; i--) {
    if (val <= 0) val = 0;
    for (int j = sum + val - hold; j > sum + val - hold - keep[i]; j--)
      ans[j] = i + 1;
    val -= min(val, jump);
    hold += keep[i];
  }
  cout << "YES\n";
  for (int i = 1; i < n + 1; i++) cout << ans[i] << " ";
  return 0;
}
