#include <bits/stdc++.h>
using namespace std;
const int INF = 1e9;
const long double EPS = 1e-8;
int main() {
  int N, M;
  cin >> N >> M;
  vector<tuple<int, int, int>> sgm(N);
  for (int i = 0; i < (int)(N); i++) {
    int l, r;
    cin >> l >> r;
    sgm[i] = make_tuple(r - l + 1, l, r);
  }
  sort((sgm).begin(), (sgm).end());
  int pos = 0;
  for (int i = 1; i <= M; ++i) {
    while (pos < N && get<0>(sgm[pos]) < i) {
      ++pos;
    }
    vector<int> cum(M + 1, 0);
    for (int j = 0; j <= M; j += i) cum[j] = 1;
    for (int j = 0; j < (int)(M); j++) cum[j + 1] += cum[j];
    int res = N - pos;
    for (int j = 0; j < (int)(pos); j++) {
      if (cum[get<2>(sgm[j])] > cum[get<1>(sgm[j]) - 1]) ++res;
    }
    cout << res << endl;
  }
  return 0;
}
