#include using namespace std; typedef signed long long ll; #undef _P #define _P(...) (void)printf(__VA_ARGS__) #define FOR(x,to) for(x=0;x<(to);x++) #define FORR(x,arr) for(auto& x:arr) #define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++) #define ALL(a) (a.begin()),(a.end()) #define ZERO(a) memset(a,0,sizeof(a)) #define MINUS(a) memset(a,0xff,sizeof(a)) //------------------------------------------------------- ll N,K; vector R[202020]; void ok() { int i; cout<<"Yes"<>N>>K; ll sum=N*(N+1)/2; if(sum%K) return _P("No\n"); int P=N/K; if(P%2==0) { FOR(x,P) { FOR(y,K) { if(x%2==0) R[y].push_back((x+(P-i))*K+y+1); else R[K-1-y].push_back((x+(P-i))*K+y+1); } } ok(); } if(P>=3 && N%2) { ll X=3*K*(3*K+1)/2/K; FOR(y,K) R[y].push_back(3*K-y); FOR(y,K) { if(y<=K/2) R[y].push_back(1+y*2); else R[y].push_back((y-K/2)*2); R[y].push_back(X-R[y][0]-R[y][1]); } for(x=3;x