#include <bits/stdc++.h>
using namespace std;
template <typename _T>
void read(_T &x) {
  _T f = 1;
  x = 0;
  char s = getchar();
  while (s > '9' || s < '0') {
    if (s == '-') f = -1;
    s = getchar();
  }
  while (s >= '0' && s <= '9') {
    x = (x << 3) + (x << 1) + (s ^ 48);
    s = getchar();
  }
  x *= f;
}
long long n, k, cnt[1000005], d[1000005];
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() {
  read(n);
  read(k);
  if (k < 2ll * n - 1 || k > 1ll * n * (n + 1) / 2LL) {
    puts("No");
    return 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 = 1;
  d[pos] = 0;
  sort(d + 2, d + n + 1);
  memset(cnt, 0, sizeof(cnt));
  for (int i = 2; i <= n; i++) {
    while (d[pos] != d[i] - 1 || cnt[pos] == r) pos++;
    printf("%d ", pos);
    cnt[pos]++;
  }
  return 0;
}
