#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int,int>;
const int N = 1e6+10;
int t,n,m,k,l,r,op,x,y;
int f[N],sum;
bool flag;
void solve(){
while(cin>>n>>m){
sum = 0;
int j = 1;
for(int i = 1;i<=n;i++,j=j%m+1){
sum += i*2;
if(j==m){
cout<<sum/m<<" ";
sum = 0;
}
}
if(sum)cout<<sum/(j-1);
cout<<"\n";
}
}
//1 2
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
solve();
return 0;
}