#include <bits/stdc++.h>
using namespace std;
struct trip {
  int a, b, c;
};
const int MAXINT = 1500;
int n, m, d, c[MAXINT], arr[MAXINT], sum[MAXINT];
bool ans = true;
int main() {
  cin >> n >> m >> d;
  for (int i = 0; i < m; i++) cin >> c[i];
  sum[m - 1] = c[m - 1];
  for (int i = 1; i < m; i++) sum[m - 1 - i] = sum[m - i] + c[m - 1 - i];
  int pos = 0, i = 0;
  while (pos < n && i < m) {
    if (sum[i] + pos <= n) {
      if (d <= n - (sum[i] + pos))
        pos += d;
      else
        pos += n - sum[i] - pos + 1;
    }
    for (int j = 0; j < c[i]; j++) arr[pos + j] = i + 1;
    pos += c[i] - 1;
    i++;
  }
  if (pos + d <= n || i < m) ans = false;
  cout << (ans ? "YES" : "NO") << endl;
  if (ans)
    for (int i = 1; i < n + 1; i++) cout << arr[i] << " ";
  if (ans) cout << endl;
  return 0;
}
