#include <bits/stdc++.h>
using namespace std;
bool contain(int l, int r, int d) { return (r / d != (l - 1) / d); }
int main(void) {
  int N, M;
  cin >> N >> M;
  vector<pair<int, int> > v(N);
  for (int i = 0; i < N; i++) {
    cin >> v[i].second >> v[i].first;
  }
  vector<int> ans(M + 1);
  ans[1] = N;
  for (auto e : v) {
    int l = e.second;
    int r = e.first;
    for (int d = 2; d <= r; d++) {
      ans[d] += contain(l, r, d);
    }
  }
  for (int d = 1; d <= M; d++) {
    printf("%d\n", ans[d]);
  }
  return 0;
}
