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>
using namespace std;


int n;
int bit[100001];

int sum(int i) {
	int s = 0;
	while(i > 0) {
		s += bit[i];
		i -= i & -i;
	}
	return s;
}

void add(int i, int x) {
	while(i <= n) {
		bit[i] += x;
		i += i & -i;
	}
}
 
int cnt[100001];
 
inline void inc_divisor(int n) {
	for(int i = 1; i * i <= n; ++i) {
		if(n % i == 0) {
			++cnt[i];
			if(cnt[i] == 2)
				add(i, 1);

			if(i != n / i) {
				++cnt[n / i];
				if(cnt[n / i] == 2)
					add(n / i, 1);
			}
		}
	}
}

inline void dec_divisor(int n) {
	for(int i = 1; i * i <= n; ++i) {
		if(n % i == 0) {
			--cnt[i];
			if(cnt[i] == 1)
				add(i, -1);

			if(i != n / i) {
				--cnt[n / i];
				if(cnt[n / i] == 1)
					add(n / i, -1);
			}
		}
	}
}
 
int main() {
	int w;
	scanf("%d %d", &n, &w);

	for(int i = 1; i < w; ++i)
		inc_divisor(i);
 
	for(int i = 1; i <= n - w + 1; ++i) {
		inc_divisor(i + w - 1);

		if(i == n - w + 1)
			printf("%d\n", w + sum(i - 1));
        else
        	printf("%d ", w + sum(i - 1));

        dec_divisor(i);
    }
 
    return EXIT_SUCCESS;
}