#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> A(M + 2, 0);
  for (int i = 0; i < N; ++i) {
    int l, r;
    cin >> l >> r;
    for (int j = 1; j < M; ++j) {
      int l_ = (l + j - 1) / j, r_ = r / j + 1;
      if (l_ == r_) break;
      if (j > 1) r_ = min({r_, (l + j - 2) / (j - 1), M + 1});
      ++A[l_];
      --A[r_];
    }
  }
  for (int i = 1; i < M + 2; ++i) {
    A[i] += A[i - 1];
  }
  cout << N << endl;
  for (int i = 2; i <= M; ++i) cout << A[i] << endl;
  return 0;
}
