#include <bits/stdc++.h>
int n, w;
int s[110], sum;
int main() {
  scanf("%d%d", &n, &w);
  for (int i = 1; i <= n; i++) scanf("%d", s + i), sum += s[i];
  if (n == 1) {
    if (w == sum) {
      puts("Yes");
      for (int i = 1; i <= w; i++) printf("1 1 ");
    } else
      puts("No");
    return 0;
  }
  if (w == 1) {
    int p;
    for (p = 1; p <= n; p++)
      if (s[p] == 1) break;
    if (p > n)
      puts("No");
    else {
      printf("Yes\n%d ", p);
      for (int i = 1; i <= n; i++)
        if (i != p)
          while (s[i]--) printf("%d %d ", i, i);
      printf("%d\n", p);
    }
    return 0;
  }
  if (w <= 0 || w > sum) return puts("No"), 0;
  puts("Yes");
  int d = sum - w, p = n;
  s[1]--, s[2]--;
  printf("1 ");
  while (p > 1 && d) {
    while (s[p] && d) printf("%d %d ", p, p), d--, s[p]--;
    while (p && !s[p]) p--;
  }
  printf("1 2 ");
  while (d) {
    while (s[p] && d) printf("%d %d ", p, p), d--, s[p]--;
    while (p && !s[p]) p--;
  }
  printf("2 ");
  while (p) {
    while (s[p]) printf("%d %d ", p, p), s[p]--;
    while (p && !s[p]) p--;
  }
  return 0;
}
