#include <bits/stdc++.h>
using namespace std;
const int N = 110, inF = 1010;
int n, w, mini, maxi, a[N], b[N];
vector<vector<int>> vec;
void NO() {
  cout << "No\n";
  exit(0);
}
void input() {
  cin >> n >> w;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    if (a[i] < a[mini]) mini = i;
    maxi += a[i];
  }
  if (w <= 0 || maxi < w) NO();
  if (w >= a[mini]) return;
  if (w == 1 || n == 1) NO();
  if (*max_element(a, a + n) == 1) NO();
}
void solve_1() {
  int waste = maxi - w;
  a[mini]--;
  cout << mini + 1 << ' ';
  for (int i = 0; i < n; i++)
    while (i != mini && waste && a[i]) {
      waste--;
      a[i]--;
      cout << i + 1 << ' ' << i + 1 << ' ';
    }
  cout << mini + 1 << ' ';
}
void do_it(int small, int big) {
  cout << small + 1 << ' ';
  b[small]--;
  for (int i = 0; i < n; i++) {
    if (i == small) continue;
    while (b[i] > (0 + (i == big))) {
      cout << i + 1 << ' ' << i + 1 << ' ';
      b[i]--;
    }
  }
  cout << small + 1 << ' ';
  cout << big + 1 << ' ';
  while (b[small]) {
    cout << small + 1 << ' ' << small + 1 << ' ';
    b[small]--;
  }
  cout << big + 1 << ' ';
}
void solve_2() {
  int small = mini, big;
  for (int i = 0; i < n; i++)
    if (a[i] > 1 && i != small) {
      big = i;
      break;
    }
  copy(a, a + n, b);
  memset(a, 0, sizeof a);
  for (int i = 0; i < n; i++)
    while (w > 2 && i != small && i != big && b[i]) {
      b[i]--;
      a[i]++;
      w--;
    }
  while (w > 2 && b[big] > 2) {
    w--;
    b[big]--;
    a[big]++;
  }
  while (w > 2 && b[small] >= 2) {
    w--;
    b[small]--;
    a[small]++;
  }
  assert(w == 2);
  do_it(small, big);
}
void print_rem() {
  for (int i = 0; i < n; i++)
    while (a[i]--) cout << i + 1 << ' ' << i + 1 << ' ';
}
void solve() {
  cout << "Yes\n";
  if (w >= a[mini])
    solve_1();
  else
    solve_2();
  print_rem();
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0);
  input();
  solve();
}
