#include <bits/stdc++.h>
using namespace std;
int n, w, sum;
pair<int, int> a[100];
int ans[200000], len;
int main() {
  scanf("%d%d", &n, &w);
  for (int i = 0; i < n; ++i) {
    scanf("%d", &a[i].first);
    a[i].second = i;
    sum += a[i].first;
  }
  if (n == 1) {
    if (sum != w)
      puts("No");
    else {
      puts("Yes");
      for (int i = 0; i < sum; ++i) printf("1 1 ");
    }
    return 0;
  }
  sort(a, a + n);
  if (w == 1) {
    if (n == 1 && sum == 1) {
      puts("Yes");
      puts("1 1");
    } else if (a[0].first == 1) {
      puts("Yes");
      printf("%d ", a[0].second + 1);
      a[0].first--;
      for (int i = 0; i < n; ++i)
        for (int j = 0; j < a[i].first; ++j) {
          printf("%d ", a[i].second + 1);
          printf("%d ", a[i].second + 1);
        }
      printf("%d", a[0].second + 1);
    } else
      puts("No");
    return 0;
  }
  if (w > sum || w <= 0) {
    puts("No");
    return 0;
  }
  if (a[0].first > w) {
    ans[len++] = a[1].second + 1;
    while (a[0].first > w - 1) {
      ans[len++] = a[0].second + 1;
      ans[len++] = a[0].second + 1;
      a[0].first--;
      sum--;
    }
    ans[len++] = a[1].second + 1;
    a[1].first--;
    sum--;
    w--;
  }
  {
    ans[len++] = a[0].second + 1;
    int cur = n - 1;
    while (sum > w) {
      if (a[cur].first <= 0)
        cur--;
      else {
        a[cur].first--;
        ans[len++] = a[cur].second + 1;
        ans[len++] = a[cur].second + 1;
        sum--;
      }
    }
    ans[len++] = a[0].second + 1;
    a[0].first--;
    for (int i = 0; i < n; ++i)
      while (a[i].first > 0) {
        ans[len++] = a[i].second + 1;
        ans[len++] = a[i].second + 1;
        a[i].first--;
      }
  }
  puts("Yes");
  for (int i = 0; i < len; ++i) printf("%d ", ans[i]);
  return 0;
}
