#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<int> l(n), r(n), x(n), ans(m, 0);
  for (int i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    x[i] = r[i] - l[i];
    ans[x[i]]++;
  }
  for (int i = m - 2; i >= 0; i--) ans[i] += ans[i + 1];
  for (int i = 0; i < n; i++) {
    for (int j = x[i] + 2; j <= m; j++) {
      if (r[i] % j <= x[i]) ans[j - 1]++;
    }
  }
  for (int i = 0; i < m; i++) cout << ans[i] << endl;
  return 0;
}
