#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n, m, d, i, j, gap;
  cin >> n >> m >> d;
  int arr[m], gaps[m];
  memset(gaps, 0, sizeof gaps);
  for (i = 0; i < m; i++) cin >> arr[i];
  gap = n - accumulate(arr, arr + m, 0);
  while (gap > 0) {
    for (i = 0; i < m; i++) {
      if (gap > 0) {
        gaps[i]++;
        gap--;
      } else
        break;
    }
    gap--;
  }
  gaps[0]++;
  if (m != 1) gaps[m - 1]++;
  int mx = *max_element(gaps, gaps + m);
  if (mx > d) {
    cout << "NO\n";
    return 0;
  }
  gaps[0]--;
  if (m != 1) gaps[m - 1]--;
  int ans[n];
  memset(ans, 0, sizeof ans);
  j = 0;
  for (i = 0; i < m; i++) {
    while (gaps[i]--) {
      ans[j++] = 0;
    }
    while (arr[i]--) {
      ans[j++] = i + 1;
    }
  }
  cout << "YES\n";
  for (i = 0; i < n; i++) cout << ans[i] << ' ';
}
