#include <bits/stdc++.h>
using namespace std;
int sum[(200)], rep[(200)], tmp[(200)];
int n, m;
bool cmp(int a, int b) { return sum[a] < sum[b]; }
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d", &sum[i]);
  memcpy(tmp, sum, sizeof(tmp));
  for (int i = 1; i <= n; i++) rep[i] = i;
  sort(rep + 1, rep + 1 + n, cmp);
  for (int i = 1; i <= n; i++) sum[i] = tmp[rep[i]];
  int tot = 0;
  for (int i = 1; i <= n; i++) tot += sum[i];
  if (m <= 0 || tot < m || n == 1 && sum[1] > m || m == 1 && sum[1] > 1) {
    puts("No");
    return 0;
  }
  puts("Yes");
  if (sum[1] > m) {
    printf("%d ", rep[n]);
    for (int i = 1; i < sum[1]; i++) printf("%d %d ", rep[1], rep[1]);
    printf("%d ", rep[n]);
    sum[n]--;
    m--;
    sum[1] = 1;
  }
  printf("%d", rep[1]);
  tot = --m;
  sum[1]--;
  for (int i = 1; i <= n; i++) {
    if (sum[i] <= tot) {
      tot -= sum[i];
      continue;
    }
    int now = sum[i] - tot;
    sum[i] = tot;
    tot = 0;
    for (int j = 1; j <= now; j++) printf(" %d %d", rep[i], rep[i]);
  }
  printf(" %d", rep[1]);
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= sum[i]; j++) printf(" %d %d", rep[i], rep[i]);
  puts("");
  return 0;
}
