#include <bits/stdc++.h>
using namespace std;
unsigned long long N, M;
unsigned long long S[100010];
unsigned long long A[100010];
int main(int argc, char const *argv[]) {
  cin >> N >> M;
  for (int i = 0; i < N; ++i) {
    int l, r;
    cin >> l >> r;
    int width = r - l;
    for (int k = 2; k <= M; ++k) {
      if (r % k <= width) {
        ++A[k];
        continue;
      }
    }
  }
  cout << N << endl;
  for (unsigned long long k = 2; k <= M; ++k) {
    cout << A[k] << endl;
  }
  return 0;
}
