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<set>
#include<vector>
using namespace std;

int main(){
  int n,w;
  set<int> s;
  vector<int> f;

  cin >> n >> w;
  cout << w << (w==n?"\n":" ");
  for(int i=1;i<=w;i++)s.insert(i);

  for(int z=w+1;z<=n;z++){
    int prv = z-w;
    f.clear();
    for(int i=1;i*i<=prv;i++){
      if(prv%i==0){
	f.push_back(i);
	if(i*i!=prv)f.push_back(prv/i);
      }
    }

    for(int i=0;i<f.size();i++){
      if(s.find(f[i])==s.end())continue;
      int pre = (prv+1)/f[i];
      if((prv+1)%f[i]!=0)pre++;
      int suf = (z-1)/f[i];
      if(suf-pre<=0)s.erase(f[i]);
    }

    f.clear();
    for(int i=1;i*i<=z;i++){
      if(z%i==0){
	f.push_back(i);
	if(i*i!=z)f.push_back(z/i);
      }
    }

    s.insert(z);
    for(int i=0;i<f.size();i++){
      if(s.find(f[i])!=s.end())continue;
      int pre = (prv+1)/f[i];
      if((prv+1)%f[i]!=0)pre++;
      int suf = (z-1)/f[i];
      if(suf-pre>=0)s.insert(f[i]);
    }

    cout << s.size() << (z==n?"\n":" ");
  }
}
    