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;

inline vector<int> factorize(int x)
{
	vector<int> ret;
	
	for (int i = 1; i * i <= x; i++){
		if (x % i == 0){
			ret.push_back(i);
			if (i * i != x) ret.push_back(x / i);
		}
	}
	
	return (ret);
}

int main()
{
	int N, W;
	int cnt = 0;
	bool manage[100001] = {0};
	
	scanf("%d %d", &N, &W);
	
	for (int i = 1; i <= W - 1; i++){
		manage[i] = true;
		cnt++;
	}
	
	for (int i = W; i <= N; i++){
		vector<int> v;
		
		if (i - W){
			v = factorize(i - W);
			
			for (int j = 0; j < v.size(); j++){
				int mini = (i - W + v[j]) / v[j], maxi = i / v[j];
				if (mini == 1 || maxi - mini >= 1) continue;
				else {
					cnt -= manage[v[j]];
					manage[v[j]] = false;
				}
			}
		}
		
		v = factorize(i);
		
		for (int j = 0; j < v.size(); j++){
			int mini = (i - W + v[j]) / v[j], maxi = i / v[j];
			if (mini == 1 || maxi - mini >= 1){
				cnt += !manage[v[j]];
				manage[v[j]] = true;
			}
		}
		
		printf("%d%c", cnt, " \n"[i == N]);
	}
	
	return (0);
}