#include <bits/stdc++.h>
using namespace std;
int N, w, n[150];
int qsum, minn, minpos;
int main() {
  minn = 0x3f3f3f3f;
  scanf("%d%d", &N, &w);
  for (int i = 1; i <= N; ++i) {
    scanf("%d", &n[i]);
    qsum += n[i];
    if (minn > n[i]) {
      minn = n[i];
      minpos = i;
    }
  }
  if (qsum < w || (N == 1 && qsum != w) || (w == 0 && qsum != 0) || w < 0) {
    printf("No\n");
    return 0;
  } else if (qsum == w) {
    printf("Yes\n");
    for (int i = 1; i <= N; ++i)
      for (int j = 1; j <= n[i]; ++j) printf("%d %d ", i, i);
    printf("\n");
    return 0;
  } else {
    if (minn > w) {
      if (w <= 1) {
        printf("No\n");
        return 0;
      }
      printf("Yes\n");
      for (int i = 1; i <= N; ++i) {
        if (i != minpos) {
          printf("%d ", i);
          for (int j = 1; j <= minn - w + 1; ++j)
            printf("%d %d ", minpos, minpos);
          printf("%d ", i);
          n[minpos] = w - 1;
          n[i]--;
          minn = w;
          break;
        }
      }
      for (int i = 1; i < n[minpos]; ++i) printf("%d %d ", minpos, minpos);
      printf("%d ", minpos);
      for (int i = 1; i <= N; ++i)
        if (i != minpos)
          for (int j = 1; j <= n[i]; ++j) printf("%d %d ", i, i);
      printf("%d\n", minpos);
      return 0;
    } else if (minn == w) {
      printf("Yes\n");
      printf("%d ", minpos);
      for (int i = 1; i <= N; ++i)
        if (i != minpos)
          for (int j = 1; j <= n[i]; ++j) printf("%d %d ", i, i);
      printf("%d ", minpos);
      for (int i = 1; i < n[minpos]; ++i) printf("%d %d ", minpos, minpos);
      printf("\n");
      return 0;
    } else {
      int td = qsum - w;
      printf("Yes\n");
      printf("%d ", minpos);
      for (int i = 1; i <= N; ++i)
        if (i != minpos)
          while (n[i] && td) {
            td--;
            n[i]--;
            printf("%d %d ", i, i);
          }
      printf("%d ", minpos);
      n[minpos]--;
      for (int i = 1; i <= N; ++i)
        while (n[i]--) printf("%d %d ", i, i);
      printf("\n");
      return 0;
    }
  }
}
