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