#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e5 + 5;
vector<int> node[MAXN];
int p[MAXN], dep[MAXN];
int n;
long long s;
long long judge(int tot, int mx) {
  int dp = 1;
  long long co = 1, res = 0;
  while (tot > 0) {
    int cnt = min(1LL * tot, co);
    tot -= cnt;
    res += 1LL * dp * cnt;
    dp++;
    co *= mx;
  }
  return res;
}
int main() {
  scanf("%d%lld", &n, &s);
  if (s > 1LL * n * (n + 1) / 2) return 0 * puts("No");
  if (s < n + n - 1) return 0 * puts("No");
  int l = 1, r = n - 1;
  int mx = 0;
  while (l <= r) {
    int mid = (l + r) >> 1;
    if (judge(n, mid) <= s) {
      r = mid - 1;
      mx = mid;
    } else {
      l = mid + 1;
    }
  }
  long long curans = 1LL * n * (n + 1) / 2;
  for (int i = 1; i <= n; i++) dep[i] = 1;
  int now = n, cur = 2;
  while (curans > s) {
    while (!dep[now]) now--;
    while (dep[cur] == 1LL * dep[cur - 1] * mx) cur++;
    assert(now >= cur);
    while (now - cur > curans - s) cur++;
    dep[now]--;
    dep[cur]++;
    curans -= now - cur;
  }
  long long tot = 1;
  node[1].push_back(1);
  for (int i = 2; i <= n; i++) {
    long long mem = tot + 1;
    for (int j = 1; j <= dep[i]; j++) node[i].push_back(++tot);
    long long sz = (int)node[i - 1].size();
    for (int v : node[i]) p[v] = node[i - 1][0] + (v - mem) % sz;
  }
  puts("Yes");
  printf("%d", p[2]);
  for (int i = 3; i <= n; i++) printf(" %d", p[i]);
  puts("");
  return 0;
}
