#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, M;
  cin >> N >> M;
  vector<long long> delta(M + 2);
  for (int i = 0; i < N; ++i) {
    long long l, r;
    cin >> l >> r;
    long long w = r + 1 - l;
    delta[0] += 1;
    delta[w] -= 1;
    long long div = w + 1;
    long long rest = 0;
    while (div <= M) {
      long long v = (l + div - 1) / div;
      if (v <= 0) break;
      long long div2 = r / v;
      if (div2 >= div) {
        delta[div - 1] += 1;
        delta[div2] -= 1;
      }
      if (v <= 1) break;
      div = l / (v - 1);
    }
  }
  long long ans = 0;
  for (int i = 0; i < M; ++i) {
    ans += delta[i];
    cout << ans << endl;
  }
  return 0;
}
