#include <bits/stdc++.h>
using namespace std;
long long n;
long long s;
bool canDo(long long br) {
  long long k = n - 1, val = 1, nodeN = br, depth = 2;
  while (k > 0 && val <= s) {
    long long loss = min(nodeN, k);
    k -= loss;
    val += loss * depth;
    nodeN *= br;
    depth++;
  }
  return (val <= s);
}
long long binary() {
  long long l = 2, r = (n - 1);
  while (l < r) {
    long long m = (l + r) / 2;
    if (canDo(m))
      r = m;
    else
      l = m + 1;
  }
  return l;
}
int main() {
  scanf("%lld %lld", &n, &s);
  if (s > n * (n + 1) / 2 || s < 2 * n - 1) {
    printf("NO");
    return 0;
  }
  printf("YES\n");
  long long b = 1;
  if (s != n * (n + 1) / 2) {
    b = binary();
  }
  vector<int> cnt(n + 1, 1), nodeP(n + 1);
  long long curVal = n * (n + 1) / 2 - s, lastPos = n, roomPos = 2,
            roomSize = b, roomCnt = 1;
  while (curVal > 0) {
    cnt[lastPos]--;
    if (lastPos - roomPos >= curVal) {
      cnt[lastPos - curVal]++;
      break;
    } else {
      cnt[roomPos]++;
      curVal -= lastPos - roomPos;
      roomCnt++;
      if (roomCnt >= roomSize) {
        roomSize *= b;
        roomCnt = 1;
        roomPos++;
      }
    }
    lastPos--;
  }
  long long sum = 0;
  for (int i = 1; i <= n; i++) {
    sum += cnt[i];
    nodeP[i] = sum;
  }
  for (int i = 2; i <= n; i++) {
    int ch = 0;
    for (int j = 1; j <= cnt[i]; j++) {
      printf("%d ", nodeP[i - 1]);
      ch++;
      if (ch >= b) {
        ch = 0;
        nodeP[i - 1]--;
      }
    }
  }
}
