#include <bits/stdc++.h>
using namespace std;
long long l[100000];
long long r[100000];
list<long long> cal_list;
list<long long> end_list;
long long ans[100000];
signed main() {
  long long n;
  long long m;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    cin >> l[i] >> r[i];
    cal_list.push_back(i);
  }
  for (long long i = m - 1; i >= 0; i--) {
    long long step = i + 1;
    ans[i] = 0;
    auto it = cal_list.begin();
    while (it != cal_list.end()) {
      long long la = l[*it];
      long long ra = r[*it];
      if (ra - la >= i) {
        end_list.push_back(*it);
        it = cal_list.erase(it);
      } else {
        long long div = (la / step);
        long long c = (step * div);
        if ((la <= c && c <= ra) || (la <= c + step && c + step <= ra)) {
          ans[i]++;
        }
        it++;
      }
    }
    ans[i] += end_list.size();
  }
  for (long long i = 0; i < m; i++) {
    cout << ans[i] << endl;
  }
}
