#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int N, M;
  cin >> N >> M;
  vector<int> l(N), r(N);
  for (int i = 0; i < N; ++i) {
    cin >> l[i] >> r[i];
  }
  vector<int> ans(M);
  for (int i = 0; i < N; ++i) {
    for (int d = 1; d < M + 1; ++d) {
      if (r[i] / d > (l[i] - 1) / d) {
        ++ans[d - 1];
      }
    }
  }
  for (auto elm : ans) {
    cout << elm << endl;
  }
  return 0;
}
