#include <bits/stdc++.h>
using namespace std;
signed main() {
  int N, M;
  cin >> N >> M;
  vector<int> imos(M + 1, 0);
  while (N--) {
    int l, r;
    cin >> l >> r;
    int ok = 1, ng = l;
    while (ng - ok > 1) {
      int mid = (ok + ng) / 2;
      if (l / mid != r / mid or
          (l <= (l / mid) * mid and (r / mid) * mid <= r)) {
        ok = mid;
      } else {
        ng = mid;
      }
    }
    imos[1]++, imos[r + 1]--;
    if (ok < l) imos[ok + 1]--, imos[l]++;
  }
  for (int i = 0; i < M; ++i) {
    imos[i + 1] += imos[i];
    cout << imos[i + 1] << endl;
  }
}
