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