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<bits/stdc++.h>
using namespace std;
using Int = long long;
signed main(){  
  cin.tie(0);
  ios::sync_with_stdio(0);
  Int n,w;
  cin>>n>>w;
  if(w==1){
    for(Int i=0;i<n;i++){
      if(i) cout<<" ";
      cout<<1;
    }
    cout<<endl;
    return 0;
  };

  vector<Int> v(n+1,0);
  Int ans=0;
  auto inc=[&](Int x){
    if(v[x]++==0) ans++;
  };
  auto dec=[&](Int x){
    if(--v[x]==0) ans--;
  };
  vector<vector<Int> > div(n+1);
  for(Int i=1;i<=n;i++)
    for(Int j=i;j<=n;j+=i)
      div[j].emplace_back(i);
  
  
  for(Int i=1;i<=w;i++)
    for(Int j:div[i]) inc(j);
  
  cout<<ans;
  for(Int i=w+1;i<=n;i++){
    Int p=i-w;
    for(Int j:div[i])
      if(p<=i-j) inc(j);    
    for(Int j:div[p])
      if(p+j<=i) dec(j);
    inc(i);
    dec(p);
    cout<<" "<<ans;
  }
  cout<<endl;
  return 0;
}

