#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;
    ++A[0];
    --A[r - l + 1];
    for (int j = 1; j <= l; ++j) {
      int l_ = l / j, r_ = r / j;
      bool f = false;
      if (l_ <= r - l + 1) {
        f = true;
        l_ = r - l + 1;
      }
      ++A[l_];
      --A[r_ + 1];
      if (f) break;
    }
  }
  for (int i = 1; i < M + 2; ++i) {
    A[i] += A[i - 1];
  }
  for (int i = 1; i <= M; ++i) cout << A[i] << endl;
  return 0;
}
