#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long t = 0, dp = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') dp = -1;
    c = getchar();
  }
  while (isdigit(c)) t = t * 10 + c - 48, c = getchar();
  return t * dp;
}
inline void write(long long x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + 48);
}
inline void writeln(long long x) {
  write(x);
  puts("");
}
inline void write_p(long long x) {
  write(x);
  putchar(' ');
}
const long long N = 100005;
long long n, S, t, a[N], Fa[N], head[N];
inline long long check(long long k) {
  a[1] = 1;
  long long now = 2, hav = n - 1;
  long long tot = 1;
  while (hav) {
    if (a[now - 1] * k >= hav)
      tot += hav * now, hav = 0, now++;
    else {
      a[now] = a[now - 1] * k;
      tot += a[now] * now;
      hav -= a[now];
      ++now;
    }
  }
  return tot;
}
vector<pair<long long, long long> > vec[N];
inline void Solve() {
  long long tot = 0;
  for (long long i = 1; i <= n; ++i)
    Fa[i] = i - 1, tot += i, vec[i].push_back(make_pair(i, t - 1)), head[i] = 0;
  tot -= S;
  if (tot < 0) {
    puts("No");
    return;
  }
  puts("Yes");
  long long dep = 1;
  for (long long i = n; i >= 2; --i) {
    if (tot == 0) break;
    if (head[dep] + 1 < vec[dep].size() && vec[dep][head[dep]].second == 0)
      head[dep]++;
    while (dep + 1 <= i && !(vec[dep][head[dep]].second)) dep++;
    long long will = i - (dep + 1);
    if (will >= tot) {
      dep = i - tot - 1;
      if (head[dep] + 1 < vec[dep].size() && vec[dep][head[dep]].second == 0)
        head[dep]++;
      Fa[i] = vec[dep][head[dep]].first;
      break;
    } else {
      tot -= will;
      vec[dep][head[dep]].second--;
      Fa[i] = vec[dep][head[dep]].first;
      vec[dep + 1].push_back(make_pair(i, t));
    }
  }
  for (long long i = 2; i <= n; ++i) write_p(Fa[i]);
}
signed main() {
  n = read();
  S = read();
  t = -1;
  long long l = 1, r = n - 1;
  while (l <= r) {
    long long mid = l + r >> 1;
    if (check(mid) <= S)
      t = mid, r = mid - 1;
    else
      l = mid + 1;
  }
  if (t == -1)
    puts("No");
  else
    Solve();
}
