#include <bits/stdc++.h>
int n, m, sum, cnt, t, x = 1, y, a[105], c[105];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++)
    scanf("%d", &a[i]), c[i] = a[i] * 2, sum += a[i], x = a[i] < a[x] ? i : x;
  if (sum < m || m < 1 || m == 1 && a[x] > 1 || n == 1 && m < a[1])
    return puts("No"), 0;
  puts("Yes"), y = x - 1 ? 1 : 2;
  if (m == 1) {
    printf("%d ", x), c[x] = 0;
    for (int i = 1; i <= n; i++)
      if (x - i)
        while (c[i]--) printf("%d ", i);
    printf("%d\n", x);
  } else if (m <= a[x]) {
    if (y <= n) printf("%d ", y), c[y]--;
    for (int i = a[x]; i >= m; i--) printf("%d %d ", x, x), c[x] -= 2;
    if (y <= n) printf("%d %d ", y, x), c[y]--, c[x]--;
    for (int i = 1; i <= n; i++)
      if (x - i)
        while (c[i]--) printf("%d ", i);
  } else {
    for (int i = 1; i <= n; i++)
      if (x - i)
        while (c[i]--) {
          printf("%d ", i), cnt++;
          if (cnt & 1 && cnt / 2 == m - a[x]) printf("%d ", x), c[x]--;
        }
  }
  while (c[x]--) printf("%d%s", x, c[x] ? " " : "\n");
  return 0;
}
