#include <bits/stdc++.h>
using namespace std;
const int MAX = 1005;
int arr[MAX], ans[MAX];
int n, m, d;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> d;
  for (int i = 0; i < m; ++i) cin >> arr[i];
  int sum[m + 1];
  sum[m] = 0;
  for (int i = m - 1; i >= 0; --i) {
    sum[i] = sum[i + 1] + arr[i];
    if (i < m - 1) sum[i]++;
  }
  int now = 0, prv = 0;
  int last = 0;
  for (int i = 1; i <= n; ++i) {
    if (i <= last) {
      ans[i] = now;
      continue;
    }
    if (now == m) break;
    if (i + sum[now] > n || i == last + d) {
      ans[i] = now + 1;
      last = i + arr[now] - 1;
      ++now;
    }
  }
  if (last + d <= n || now != m) return cout << "NO\n", 0;
  cout << "YES\n";
  for (int i = 1; i <= n; ++i) cout << ans[i] << " ";
  return 0;
}
