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 <cstdio>
#include <cstdlib>
#include <cstring>
#include <climits>
#include <cassert>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <algorithm>
#include <numeric>
#include <complex>
#include <stack>
#include <queue>
#include <list>
#include <set>
#include <map>
#include <bitset>
#include <functional>
#include <iterator>

using namespace std;

#define dump(n) cout<<"# "<<#n<<'='<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define peri(i,a,b) for(int i=int(b);i-->int(a);)
#define rep(i,n) repi(i,0,n)
#define per(i,n) peri(i,0,n)
#define iter(c) __typeof__((c).begin())
#define foreach(i,c) for(iter(c) i=(c).begin();i!=(c).end();++i)
#define all(c) (c).begin(),(c).end()
#define mp make_pair

typedef unsigned int uint;
typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vd> vvd;
typedef vector<string> vs;
typedef pair<int,int> pii;

const int INFTY=1<<29;
const double EPS=1e-9;

template<typename T1,typename T2>
ostream& operator<<(ostream& os,const pair<T1,T2>& p){
	return os<<'('<<p.first<<','<<p.second<<')';
}
template<typename T>
ostream& operator<<(ostream& os,const vector<T>& a){
	os<<'[';
	rep(i,a.size()) os<<(i?" ":"")<<a[i];
	return os<<']';
}

int main()
{
	int n,w; cin>>n>>w;
	
	vi ds(n+1);
	for(int i=1;i<=w;i++){
		ds[i]+=2;
		for(int j=1,x=i;j*j<=x;j++)
			if(x%j==0){
				ds[j]++;
				if(j*j<x)
				ds[x/j]++;
			}
	}
	printf("%d",w); // f({1..w})=w は常に成立
	
	int cnt=w;
	for(int i=w+1;i<=n;i++){
		ds[i]+=2; cnt++;
		ds[i-w]-=2;
		if(ds[i-w]<2) cnt--;
		
		for(int j=1,x=i-w;j*j<=x;j++){
			if(x%j==0){
				ds[j]--;
				if(ds[j]==1) cnt--;
				if(j*j<x){
					ds[x/j]--;
					if(ds[x/j]==1) cnt--;
				}
			}
		}
		for(int j=1,x=i;j*j<=x;j++){
			if(x%j==0){
				ds[j]++;
				if(ds[j]==2) cnt++;
				if(j*j<x){
					ds[x/j]++;
					if(ds[x/j]==2) cnt++;
				}
			}
		}
		printf(" %d",cnt);
	}
	puts("");
	
	return 0;
}