#include <bits/stdc++.h>
using namespace std;
const int N = 100005;
int d[N], sn[N], fa[N], l = 1, r = N, mn = 1, mid, n;
vector<int> t[N];
long long s;
long long calc(int t) {
  long long sum = 1;
  d[1] = 1;
  for (int i = (2); i <= int(n); i++) {
    d[i] = d[(i - 2) / t + 1] + 1;
    sum += d[i];
  }
  return sum;
}
int get(int x) {
  while (!t[x].empty()) {
    int now = t[x].back();
    if (d[now] == x && sn[now]) return now;
    t[x].pop_back();
  }
  return 0;
}
int main() {
  cin >> n >> s;
  if (s > 1ll * n * (n + 1) / 2) return puts("No"), 0;
  if (s < 2 * n - 1) return puts("No"), 0;
  while (l < r) {
    mid = (l + r) >> 1;
    if (calc(mid) <= s)
      r = mid;
    else
      l = mid + 1;
  }
  for (int i = (1); i <= int(n); i++) {
    fa[i] = i - 1;
    d[i] = i, t[i].push_back(i);
    sn[i] = l - 1;
  }
  s = 1ll * n * (n + 1) / 2 - s;
  int k = n;
  while (s) {
    while (!get(mn)) mn++;
    if (s <= d[k] - mn - 1) {
      fa[k] = get(d[k] - s - 1);
      break;
    }
    s -= d[k] - mn - 1;
    fa[k] = get(mn);
    --sn[get(mn)];
    sn[k] = l, d[k] = mn + 1, t[d[k]].push_back(k);
    k--;
  }
  puts("Yes");
  for (int i = (2); i <= int(n); i++) printf("%d ", fa[i]);
  return 0;
}
