#include <bits/stdc++.h>
using namespace std;
int a[150], b[150];
int cmp(int x, int y) { return a[x] < a[y]; }
int main() {
  int s = 0, w, n, y;
  scanf("%d%d", &n, &w);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  for (int i = 1; i <= n; ++i) b[i] = i;
  sort(b + 1, b + n + 1, cmp);
  for (int i = 1; i <= n; ++i) s += a[i];
  if (w < 0 || w > s || (w == 1 && a[b[1]] > 1)) {
    printf("No\n");
    return 0;
  }
  if (n == 1) {
    if (w == a[1]) {
      printf("Yes\n");
      for (int i = 1; i <= 2 * a[1]; ++i) printf("1\n");
    } else
      printf("No\n");
    return 0;
  }
  printf("Yes\n");
  if (a[b[1]] <= w) {
    for (int i = 1; i <= 2 * (a[b[1]] - 1); ++i) printf("%d ", b[1]);
    y = a[b[1]] - 1;
    if (y == w - 1) printf("%d ", b[1]);
    for (int i = 2; i <= n; ++i)
      while (a[b[i]]--) {
        printf("%d %d ", b[i], b[i]);
        y++;
        if (y == w - 1) printf("%d ", b[1]);
      }
    printf("%d\n", b[1]);
  } else {
    printf("%d ", b[2]);
    for (int i = 1; i <= 2 * (a[b[1]] - 1); ++i) printf("%d ", b[1]);
    y = 1;
    printf("%d ", b[2]);
    if (y == w - 1) printf("%d ", b[1]);
    for (int i = 1; i <= a[b[2]] - 1; ++i) {
      printf("%d %d ", b[2], b[2]);
      y++;
      if (y == w - 1) printf("%d ", b[1]);
    }
    for (int i = 3; i <= n; ++i)
      while (a[b[i]]--) printf("%d %d ", b[i], b[i]);
    printf("%d ", b[1]);
  }
}
