#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 1e9 + 7;
long long a[N];
long long sum[N];
int vis[N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  long long n, m, d;
  cin >> n >> m >> d;
  for (int i = 1; i <= m; i++) cin >> a[i], sum[i] = sum[i - 1] + a[i];
  long long now = 0;
  for (int i = 1; i <= m; i++) {
    int tmp = min(d, n - (sum[m] - sum[i - 1] + now) + 1);
    now += tmp + a[i] - 1;
    for (int j = now - a[i] + 1; j <= now; j++) {
      vis[j] = i;
    }
  }
  if (now + d < n + 1 || now - a[m] + 1 > n) {
    cout << "NO" << '\n';
  } else {
    cout << "YES" << '\n';
    for (int i = 1; i <= n; i++) {
      cout << vis[i] << " \n"[i == n];
    }
  }
}
