#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; int main(){ int n, k; cin >> n >> k; if (n == 1 && k == 1) { cout << "Yes" << endl; cout << 1 << endl; return 0; } if (n & 1) { cout << "No" << endl; return 0; } else { int m = n / k; if (m & 1 || k == 1) { cout << "No" << endl; return 0; } else { cout << "Yes" << endl; vector l(n/2), r(n/2); for (int i = 0; i < n/2 ; i++) l[i] = n/2 - i; for (int i = 1; i <= n/2; i++) r[i-1] = i + n/2; int cnt = 0; m /= 2; for (int i = 0; i < n/2; i++) { cout << l[i] << " " << r[i] << " "; cnt++; if (cnt == m) { cnt = 0; cout << endl; } } } } return 0; }