#include <bits/stdc++.h>
using namespace std;
unsigned long long N, M;
unsigned long long S[100010];
unsigned long long A[(100001ull)];
int main(int argc, char const *argv[]) {
  cin >> N >> M;
  for (int i = 0; i < N; ++i) {
    int l, r;
    cin >> l >> r;
    for (int j = l; j <= r; ++j) {
      ++S[j];
    }
    for (int k = 2; k < (100001ull); ++k) {
      for (int j = l; j <= r; ++j) {
        if (j % k == 0) {
          ++A[k];
          break;
        }
      }
    }
  }
  cout << N << endl;
  for (unsigned long long k = 2; k < min((100001ull), M + 1); ++k) {
    cout << A[k] << endl;
  }
  for (size_t i = (100001ull); i <= M; i++) {
    int cnt = 0;
    for (size_t j = i; j <= M; j += i) {
      cnt += S[j];
    }
    cout << cnt << endl;
  }
  return 0;
}
