#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 5, mod = 998244353;
template <class o>
inline void qr(o &x) {
  x = 0;
  char c = getchar();
  int f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    x = x * 10 + (c ^ 48);
    c = getchar();
  }
  x *= f;
}
template <class o>
void qw(o x) {
  if (x / 10) qw(x / 10);
  putchar(x % 10 + 48);
}
template <class o>
void pr1(o x) {
  if (x < 0) putchar('-'), x = -x;
  qw(x);
  putchar(' ');
}
template <class o>
void pr2(o x) {
  if (x < 0) putchar('-'), x = -x;
  qw(x);
  puts("");
}
inline int ksm(int a, int b = mod - 2) {
  int ans = 1;
  for (; b; b >>= 1, a = 1ll * a * a % mod)
    if (b & 1) ans = 1ll * ans * a % mod;
  return ans;
}
inline int add(int a, int b) { return a += b, a >= mod ? a - mod : a; }
inline int sub(int a, int b) { return a -= b, a < 0 ? a + mod : a; }
bool can[55][55];
int cnt;
void init() {
  can[1][0] = 1;
  for (int i = 3; i <= 15; i += 2)
    for (int c1 = 1; c1 < (i - 1); c1 += 2) {
      int c2 = i - c1 - 1;
      int f1 = max(c1, c2) >= min(c1, c2) * 2;
      for (int p = 0; p <= c1; ++p)
        for (int q = 0; q <= c2; ++q)
          if (can[c1][p] && can[c2][q]) can[i][p + q + f1] = 1;
    }
}
bool ok(int i, int j) {
  if (i % 2 == 0) return 0;
  if (i <= 15) return can[i][j];
  if (j == 0 || j == 1) return ((i & (i + 1)) == 0) ^ j;
  return j > 0 && j * 2 + 3 <= i;
}
void dfs(int n, int k, int f) {
  pr1(f);
  int x = ++cnt;
  if (n == 1) return;
  for (int l = 1; l < n - 1; l = l << 1 | 1) {
    int r = n - l - 1, kr = k - (max(l, r) >= 2 * min(l, r));
    if (ok(l, 0) && ok(r, kr)) {
      dfs(l, 0, x);
      dfs(r, kr, x);
      return;
    }
  }
}
void solve() {
  int n, k;
  qr(n);
  qr(k);
  init();
  if (!ok(n, k)) {
    puts("No");
    return;
  }
  cnt = 0;
  puts("Yes");
  dfs(n, k, 0);
}
int main() {
  solve();
  return 0;
}
