#include <bits/stdc++.h>
using namespace std;
vector<long long> avl;
vector<long long> psm;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  avl.resize(m + 3);
  psm.resize(m + 3);
  cin >> n >> m;
  long long l, r;
  long long tlm = 1;
  while ((tlm + 1) * (tlm + 1) < m) ++tlm;
  long long nxt;
  long long nr, nl;
  for (long long zz = 0; zz < (n); ++zz) {
    cin >> l >> r;
    for (long long i = 1; i <= tlm; ++i) {
      if (r / i != (l - 1) / i) ++avl[i];
    }
    nxt = tlm + 1;
    for (long long hts = tlm + 4; hts >= 1; --hts) {
      nl = (l - 1) / hts + 1;
      nr = r / hts;
      nl = max(nl, nxt);
      if (nl > nr) continue;
      ++psm[nl];
      --psm[nr + 1];
      nxt = nr + 1;
    }
  }
  for (long long i = 1; i <= m; ++i) {
    psm[i] += psm[i - 1];
    avl[i] += psm[i];
    cout << avl[i] << "\n";
  }
  return 0;
}
