#include <bits/stdc++.h>
using namespace std;
vector<int> height;
vector<int> level[111111];
long long s;
int n, p[111111];
bool solve(int deg) {
  height.clear();
  height.push_back(1);
  int rem = n - 1;
  long long sum = n;
  while (rem > 0) {
    sum += rem;
    height.push_back(min(1ll * rem, 1ll * height.back() * (deg)));
    rem -= height.back();
  }
  if (sum > s) return false;
  int x = height.size();
  for (int i = x - 1; i >= 0; i--) {
    if (sum == s) return true;
    while (height[i] > 1) {
      if (sum + height.size() - i < s) {
        height[i]--;
        sum += height.size() - i;
        height.push_back(1);
      } else if (sum + height.size() - i == s) {
        height[i]--;
        height.push_back(1);
        return true;
      } else {
        int down = s - sum;
        height[i]--;
        height[i + down]++;
        return true;
      }
    }
  }
}
void gen_ans(int max_deg) {
  int cnt = 0;
  for (int i = 0; i < height.size(); i++)
    for (int j = 1; j <= height[i]; j++) level[i].push_back(++cnt);
  for (int i = 1; i < height.size(); i++) {
    int ptr = 0;
    int deg = 0;
    for (int j = 0; j < level[i].size(); j++) {
      if (deg == max_deg) {
        deg = 0;
        ptr++;
      }
      p[level[i][j]] = level[i - 1][ptr];
      deg++;
    }
  }
}
int main() {
  cin >> n >> s;
  if (s > 1ll * n * (n + 1) / 2 || s < 2 * n - 1) {
    cout << "No";
    return 0;
  }
  if (s == 1ll * n * (n + 1) / 2) {
    cout << "Yes\n";
    for (int i = 2; i <= n; i++) cout << i - 1 << ' ';
    return 0;
  }
  for (int i = 2; i < n; i++)
    if (solve(i)) {
      gen_ans(i);
      break;
    }
  cout << "Yes\n";
  for (int i = 2; i <= n; i++) cout << p[i] << ' ';
}
