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 <vector>
#include <iostream>
#include <set>
#include <cstdio>
#include <queue>
#include <cstdio>
#include <cstdlib>
#include <cassert>
#include <ctime>
#include <algorithm>
#include <algorithm>
#include <limits>
#include <map>

using namespace std;

#include <algorithm>

//0-indexed overflow-> max:Height*MOD sum's comment out:2*MOD
template <class T, int SIZE>
struct BinaryIndexedTree {
    T seg[SIZE];
    
    inline void init() {
        fill_n(seg, SIZE, 0);
    }

    inline void add(uint i, T x) {
        while (i < SIZE) {
            seg[i] += x;
            i += (i+1) & ~i;
        }
    }
    //[0, i)
    inline T sum(uint i) {
        T s = 0;
        uint d = 1;
        while (i >= d) {
            i -= d;
            s += seg[i];
            d = (i+1) & ~i;
        }
        return s;
    }
    //[a, b)
    inline T sum(uint a, uint b) {
        T d = sum(b) - sum(a);
        return d;
    }
};
typedef long long ll;
typedef pair<int, int> P;

const int MN = 100100;
BinaryIndexedTree<int, MN> b;
int main() {
    b.init();
    int n, m;
    cin >> n >> m;
    for (int i = 1; i < MN; i++) {
        if (i*2 <= m) {
            b.add(max(0, i), 1);
            continue;
        }
        if (m <= i) {
            break;
        }
        int u = m-i;
        for (int j = i; j < MN; j += i) {
            b.add(max(i, j-u), 1);
            b.add(max(i, j), -1);
        }
    }
    for (int i = 1; i <= n-m+1; i++) {
        printf("%d", b.sum(i)+m);
        if (i < n-m+1) {
            printf(" ");
        } else {
            printf("\n");
        }
    }
    return 0;
}