#include <bits/stdc++.h>
using namespace std;
int sum = 0;
int n, W;
int num[105];
pair<int, int> seq[105];
inline void rd(int &x) {
  x = 0;
  char ch = getchar();
  int f = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  x *= f;
}
int main() {
  rd(n);
  rd(W);
  for (int i = 1; i <= n; ++i)
    rd(num[i]), seq[i] = make_pair(num[i], i), sum += num[i];
  sort(seq + 1, seq + n + 1);
  if (W <= 0 || W > sum) {
    puts("No");
    return 0;
  }
  if (W >= seq[1].first) {
    puts("Yes");
    printf("%d ", seq[1].second);
    int at = sum - W;
    for (int i = 2; i <= n; ++i) {
      while (at && seq[i].first) {
        at--;
        seq[i].first--;
        printf("%d %d ", seq[i].second, seq[i].second);
      }
    }
    printf("%d ", seq[1].second);
    seq[1].first--;
    for (int i = 1; i <= n; ++i) {
      while (seq[i].first) {
        printf("%d %d ", seq[i].second, seq[i].second);
        seq[i].first--;
      }
    }
    return 0;
  }
  if (W == 1 || n == 1) {
    puts("No");
    return 0;
  }
  puts("Yes");
  printf("%d %d ", seq[1].second, seq[2].second);
  for (int i = 3; i <= n; ++i) {
    while (seq[i].first) {
      printf("%d %d ", seq[i].second, seq[i].second);
      seq[i].first--;
    }
  }
  printf("%d ", seq[1].second);
  for (int i = seq[1].first - 1; i >= W; --i)
    printf("%d %d ", seq[1].second, seq[1].second);
  printf("%d ", seq[2].second);
  printf("%d ", seq[1].second);
  for (int i = seq[2].first - 1; i >= 1; --i)
    printf("%d %d ", seq[2].second, seq[2].second);
  printf("%d ", seq[1].second);
  for (int i = W - 2; i >= 1; --i)
    printf("%d %d ", seq[1].second, seq[1].second);
  return 0;
}
