#include <bits/stdc++.h>
using namespace std;
int n[110];
int N, W;
int res[210000];
int main(int argc, char** argv) {
  cin >> N >> W;
  int minNum = 9000;
  int maxPossible = 0;
  int startPos;
  for (int i = 0; i < N; i++) {
    scanf("%d", &n[i]);
    if (n[i] < minNum) {
      minNum = n[i];
      startPos = i;
    }
    maxPossible += n[i];
  }
  int minPossible = min(2, minNum);
  int nLoop = minPossible;
  if (N == 1) {
    if (W == n[0]) {
      printf("Yes\n");
      for (int i = 0; i < 2 * n[0]; i++) printf("1 ");
      printf("\n");
    } else
      printf("No\n");
    return 0;
  }
  if (minPossible <= W && W <= maxPossible) {
    printf("Yes\n");
    int i = 0;
    int cur = startPos;
    int y = 0;
    int secLoop = -1;
    n[cur]--;
    if (nLoop == 2) {
      secLoop = (startPos + 1) % N;
      n[secLoop]--;
    }
    for (; y < W - nLoop;)
      if (n[cur] > 0) {
        res[i] = res[i + 1] = cur;
        i += 2;
        y++;
        n[cur]--;
      } else
        cur = (cur + 1) % N;
    res[i++] = startPos;
    for (int k = 0; k < N; k++)
      if (k != startPos) {
        while (n[k] > 0) {
          res[i] = res[i + 1] = k;
          n[k]--;
          i += 2;
        }
      }
    res[i++] = startPos;
    if (nLoop == 2) {
      res[i++] = secLoop;
      for (int k = 0; k < N; k++)
        if (k == startPos) {
          while (n[k] > 0) {
            res[i] = res[i + 1] = k;
            n[k]--;
            i += 2;
          }
        }
      res[i++] = secLoop;
    }
    for (int j = 0; j < i; j++) printf("%d ", res[j] + 1);
    printf("\n");
  } else
    printf("No\n");
  return 0;
}
