#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long n, k;
  cin >> n >> k;
  k = min(k, n - k);
  long long cur = 1;
  long long ind = 0;
  long long cross = 1;
  for (long long i = 0; i < n; i++) {
    long long nind = (ind + k) % n;
    if (nind < ind && nind) {
      cross++;
      cur += cross;
      cross++;
    } else {
      cur += cross;
    }
    ind = nind;
    cout << cur << " ";
  }
  cout << endl;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
