Sliding GCD

Problem Statement

For the set S of natural numbers, let f (S) be the number of elements in the set \\ {GCD (T) | T ⊆ S, T is not empty \\}.

Here, GCD (T) is the greatest integer that divides all the numbers contained in T.
In particular, note that GCD (\\ {a \\}) = a when T consists of only one integer a.

Find f (\\ {i, i + 1, ..., i + W --1 \\}) for i = 1, 2, ..., N --W + 1.

Constraints

* 1 ≤ W ≤ N ≤ 10 ^ 5

Input

Input follows the following format. All given numbers are integers.


N W

Output

The value of f (\\ {i, i + 1, ..., i + W-1 \\}) when i = 1, 2, ..., N-W + 1 is separated by a space. Print on a line.

Examples

Input

10 2


Output

2 3 3 3 3 3 3 3 3


Input

30 7


Output

7 8 9 10 10 11 11 11 11 12 11 12 10 12 12 11 10 12 12 12 10 11 11 13
#include <iostream>
#include <iomanip>
#include <sstream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <climits>
#include <queue>
#include <set>
#include <map>
#include <valarray>
#include <bitset>
#include <stack>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
#define chmax(a,b) (a<(b)?(a=b,1):0)
#define chmin(a,b) (a>(b)?(a=b,1):0)
#define valid(y,x,h,w) (0<=y&&y<h&&0<=x&&x<w)
typedef long long ll;
typedef pair<int,int> pii;
const int INF = 1<<29;
const double PI = acos(-1);
const double EPS = 1e-8;

vector<int> divisor[100001];
int cnt[100001];
bool f[100001];

int main() {
  const int N = 100000;
  for (int i=1; i<=N; ++i) {
    for (int j=i; j<=N; j+=i)
      divisor[j].push_back(i);
  }
  int w,n;
  while(cin>>n>>w) {
    int ans = w;
    for (int i=1; i<=w; ++i) {
      f[i] = 1;
      FOR(it, divisor[i]) {
        if (++cnt[*it] == 2 && !f[i]) ans++;
      }
    }
    cout << ans;
    for (int i=1; i<=n-w; ++i) {
      f[i+w] = 1;
      ans++;
      FOR(it, divisor[i])
        if (--cnt[*it] == 1 && !f[*it]) ans--;
      FOR(it, divisor[i+w])
        if (++cnt[*it] == 2 && !f[*it]) ans++;
      f[i] = 0;
      if (cnt[i] < 2) ans--;
      cout << " " << ans;
    }
    cout << endl;
  }
}