#include <bits/stdc++.h>
#pragma optimization_level 3
using namespace std;
int N, M;
int L[300000], R[300000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> N >> M;
  vector<pair<int, int> > s;
  for (int i = 0; i < N; i++) {
    int l, r;
    cin >> l >> r;
    s.push_back(make_pair(l, r));
  }
  sort(s.begin(), s.end());
  cout << N << "\n";
  for (int p = 2; p <= M; p++) {
    int c = 0;
    int t = p;
    for (int i = 0; i < N; i++) {
      int l = s[i].first, r = s[i].second;
      if (l > t) t = (((l + p - 1) / p) * p);
      if (t <= r) {
        c++;
        while (i + 1 < N && t >= s[i + 1].first) {
          if (t <= s[i + 1].second) c++;
          i++;
        }
      }
    }
    cout << c << "\n";
  }
  return 0;
}
