#include <bits/stdc++.h>
using namespace std;
long long n, m;
vector<long long> a(m + 10);
int main() {
  cin >> n >> m;
  long long x, y, z;
  for (int i = 0; i < n; i++) {
    cin >> x >> y;
    z = y - x + 1;
    a[0] += 1;
    a[z] -= 1;
    long long t = z + 1, s;
    while (t <= m) {
      long long v = ((x + t - 1) / t);
      if ((x + t - 1) / t <= 0) break;
      s = y / ((x + t - 1) / t);
      if (s >= t) a[t - 1] += 1, a[s] -= 1;
      if ((x + t - 1) / t <= 1) break;
      t = max(s + 1, (x + (v - 1) - 1) / (v - 1));
    }
  }
  long long ans = 0;
  for (int i = 0; i < m; i++) ans += a[i], cout << ans << endl;
  return 0;
}
