#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
long long n, k, cnt[maxn], d[maxn];
bool check(int x) {
  long long i(2), j, t = 1, num = k - n, dep = 0;
  memset(d, 0, sizeof d);
  memset(cnt, 0, sizeof cnt);
  while (i <= n) {
    t *= x;
    ++dep;
    for (j = 1; j <= t && i <= n; ++i, ++j) cnt[dep]++, d[i] = dep, num -= dep;
  }
  if (num < 0) return false;
  j = n;
  while (num) {
    ++dep;
    if (cnt[d[j]] == 1) --j;
    t = min(num, dep - d[j]);
    cnt[d[j]]--;
    d[j] += t;
    cnt[d[j]]++;
    num -= t;
    --j;
  }
  return true;
}
signed main() {
  cin >> n >> k;
  if (k < (1LL * 2 * n - 1) || k > (1LL * n * (n + 1) / 2)) {
    puts("No");
    exit(0);
  }
  int l = 1, r = n;
  while (l < r) {
    int mid = (l + r) >> 1;
    if (check(mid))
      r = mid;
    else
      l = mid + 1;
  }
  check(r);
  puts("Yes");
  int pos;
  d[pos = 1] = 0;
  sort(d + 2, d + 1 + n);
  memset(cnt, 0, sizeof cnt);
  for (int i = 2; i <= n; ++i) {
    while (d[pos] != d[i] - 1 || cnt[pos] == r) ++pos;
    cout << pos << ' ';
    cnt[pos]++;
  }
}
