#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, M, l, r;
  cin >> N >> M;
  vector<int> res(M, 0);
  for (int i = 0; i < N; i++) {
    cin >> l >> r;
    for (int j = 0; j < M; j++) {
      if (l % (j + 1) == 0) {
        res[j]++;
      } else {
        if (l / (j + 1) != r / (j + 1)) {
          res[j]++;
        }
      }
    }
  }
  for (int i = 0; i < M; i++) {
    cout << res[i] << endl;
  }
  return 0;
}
