#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> imos(M + 2, 0);
  for (int i = 0; i < N; ++i) {
    int l, r;
    cin >> l >> r;
    if ((l - 1) * 2 <= r) {
      ++imos[1];
      --imos[r + 1];
    } else {
      ++imos[1];
      --imos[r - l + 2];
      for (int p = 1; p * max(p, r - l + 2) <= r; ++p) {
        int a = 1 + (l - 1) / p, b = 1 + r / p;
        ++imos[max(a, r - l + 2)];
        --imos[b];
      }
    }
  }
  for (int i = 1; i <= M; ++i) {
    imos[i] += imos[i - 1];
    cout << imos[i] << endl;
  }
  return 0;
}
