#include <bits/stdc++.h>
using namespace std;
int p[100002];
int deg[100001];
struct comp {
  bool operator()(const pair<int, int> a, const pair<int, int> b) const {
    if (a.first == b.first) return a.second > b.second;
    return a < b;
  }
};
long long minsum(long long n, long long d) {
  long long cntsum = 1;
  long long cntvert = 1;
  long long cntv = 1;
  long long depth = 0;
  while (cntvert < n) {
    depth++;
    cntvert += cntv * d;
    cntsum += cntv * d * (depth + 1);
    cntv = cntv * d;
  }
  return cntsum - (cntvert - n) * (depth + 1);
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  long long s;
  cin >> n >> s;
  int diam = -1;
  for (int i = 1; i < n; i++) {
    long long sum = minsum(n, i);
    if (sum <= s) {
      if (!(i == 1 && sum < s)) diam = i;
      break;
    }
  }
  if (diam == -1) {
    cout << "No\n";
    return 0;
  }
  cout << "Yes\n";
  set<pair<int, int>, comp> pq;
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += i;
    pq.insert({i, i});
    if (i >= 2) p[i] = i - 1;
    if (i < n) deg[i]++;
  }
  while (sum > s) {
    pair<int, int> t = *pq.begin();
    pair<int, int> b = *pq.rbegin();
    deg[b.second - 1]--;
    if (sum - (b.first - (t.first + 1)) > s) {
      sum -= (b.first - (t.first + 1));
      p[b.second] = t.second;
      if (++deg[t.second] >= diam) {
        pq.erase(t);
      }
      pq.insert({t.first + 1, b.second});
      pq.erase(b);
    } else {
      p[b.second] = p[b.second] - (sum - s);
      sum = s;
    }
  }
  for (int i = 0; i < n - 1; i++) {
    cout << p[i + 2] << ' ';
  }
  return 0;
}
