#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M;
  cin >> N >> M;
  vector<int> l(N), r(N);
  for (int i = 0; i < N; i++) {
    cin >> l[i] >> r[i];
  }
  for (int i = 1; i <= M; i++) {
    if (i == 1) {
      cout << N << endl;
      continue;
    }
    vector<int> used(N, 0);
    for (int j = 1; i * j <= M; j++) {
      for (int k = 0; k < N; k++) {
        if (l[k] <= i * j and i * j <= r[k]) used[k] = true;
      }
    }
    cout << accumulate(used.begin(), used.end(), 0) << endl;
  }
  return 0;
}
