#include <bits/stdc++.h>
using namespace std;
const int N = 1011110;
int s[N];
int n, k;
int cal(int x) {
  int ans = 0;
  for (; x > 0; x -= x & -x) ans += s[x];
  return ans;
}
void update(int x) {
  for (; x <= n; x += x & -x) s[x]++;
}
int main() {
  scanf("%d%d", &n, &k);
  k = min(k, n - k);
  memset(s, 0, sizeof(s));
  int x = 1;
  long long ans = 1;
  for (int i = 1; i <= n; i++) {
    if (x + k <= n)
      ans += cal(x + k - 1) - cal(x) + 1;
    else
      ans += cal(x + k - n - 1) + cal(n) - cal(x) + 1;
    cout << ans << " ";
    update(x);
    update((x + k - 1) % n + 1);
    x = (x + k - 1) % n + 1;
  }
}
