#include <bits/stdc++.h>
using namespace std;
const int Nmax = 300000;
int N, M, L[Nmax], R[Nmax];
int main() {
  cin >> N >> M;
  for (int i = 0; i < N; i++) cin >> L[i] >> R[i];
  vector<pair<int, int> > vec;
  for (int i = 0; i < N; i++) {
    vec.push_back(make_pair(R[i] - L[i] + 1, i));
  }
  sort(vec.begin(), vec.end());
  for (int i = 1; i <= M; i++) {
    int ans = 0;
    vector<pair<int, int> >::iterator k =
        lower_bound(vec.begin(), vec.end(), make_pair(i, -1));
    ans += vec.end() - k;
    for (vector<pair<int, int> >::iterator j = vec.begin(); j != k; j++) {
      int n = L[j->second] / i;
      if (L[j->second] % i > 0) n += 1;
      if (n * i <= R[j->second]) ans++;
    }
    cout << ans << endl;
  }
  return 0;
}
