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 <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <cassert>

using namespace std;

#define FOR(i,k,n) for(int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n)
#define FORIT(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

template<class T> void debug(T begin, T end){ for(T i = begin; i != end; ++i) cerr<<*i<<" "; cerr<<endl; }
inline bool valid(int x, int y, int W, int H){ return (x >= 0 && y >= 0 && x < W && y < H); }

typedef long long ll;
const int INF = 100000000;
const double EPS = 1e-8;
const int MOD = 1000000007;
int dx[8] = {1, 0, -1, 0, 1, -1, -1, 1};
int dy[8] = {0, 1, 0, -1, 1, 1, -1, -1};

int main(){
  int W, N;
  const int MAX_N = 100001;
  while(cin >> N >> W){
    int b = 1, e = W;
    int cnt = W;
    vector<bool> used(MAX_N, false);
    REP(i, W) used[i + 1] = true;
    vector<int> ans;
    while(e <= N){
      ans.push_back(cnt);
      for(int i = 1; i * i <= b; i++)if(b % i == 0){
        if(used[i] && b + 2 * i > (e + 1)){
          used[i] = false;
          cnt--;
        }
        if(used[b / i] && b + 2 * (b / i) > e + 1){
          used[b / i] = false;
          cnt--;
        }
      }
      b++; e++;
      assert(!used[e]);
      used[e] = true;
      cnt++;
      for(int i = 1; i * i <= e; i++) if(e % i == 0){
        if(!used[i] && e - i >= b){
          used[i] = true;
          cnt++;
        }
        if(!used[e / i] && e - (e / i) >= b){
          used[e / i] = true;
          cnt++;
        }
      }
    }
    REP(i, ans.size()) {
      cout << ans[i];
      if(i == ans.size() - 1) cout << endl;
      else cout << " ";
    }
  }
  return 0;
}