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>
typedef long long int ll;
typedef unsigned long long int ull;
#define BIG_NUM 2000000000
#define MOD 1000000007
#define EPS 0.000000001
using namespace std;


#define NUM 100005

int N,W;
int count_table[NUM];
int ans[NUM];
vector<int> G[NUM];

int main(){

	scanf("%d %d",&N,&W);

	//約数の集合を作る
	for(int base = 1; base <= N; base++){
		for(int to = base; to <= N; to += base){
			G[to].push_back(base);
		}
	}

	for(int i = 1; i <= N; i++){
		count_table[i] = 0;
	}

	for(int i = 1; i <= W; i++){

		for(int k = 0; k < G[i].size(); k++){
				count_table[G[i][k]]++;
		}
		count_table[i] += 2;
	}

	ans[1] = W;
	int tmp_num = W;

	for(int left = 2; left <= N-W+1; left++){

		count_table[left-1] -= 2;
		if(count_table[left-1] < 2)tmp_num--;

		for(int i = 0; i < G[left-1].size(); i++){

			count_table[G[left-1][i]]--;
			if(count_table[G[left-1][i]] == 1){
				tmp_num--;
			}
		}

		tmp_num++;
		count_table[left+W-1] += 2;

		for(int i = 0; i < G[left+W-1].size(); i++){
			count_table[G[left+W-1][i]]++;
			if(count_table[G[left+W-1][i]] == 2){

				tmp_num++;
			}
		}
		ans[left] = tmp_num;
	}

	printf("%d",ans[1]);

	for(int i = 2; i <= N-W+1; i++){
		printf(" %d",ans[i]);
	}
	printf("\n");

	return 0;
}

