#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  cin >> n >> m;
  vector<pair<int, int> > vec, v2;
  for (int i = 0; i < n; i++) {
    int a, b;
    cin >> a >> b;
    vec.push_back(pair<int, int>(b - a + 1, i));
    v2.push_back(pair<int, int>(a, b));
  }
  sort(vec.begin(), vec.end());
  for (int d = 1; d <= m; d++) {
    int pos =
        lower_bound(vec.begin(), vec.end(), pair<int, int>(d, 0)) - vec.begin();
    int ans = n - pos;
    for (int i = 0; i < pos; i++) {
      int pnt = vec[i].second;
      if (v2[pnt].first % d == 0 || v2[pnt].second % d == 0)
        ans++;
      else if (v2[pnt].second % d < v2[pnt].first % d)
        ans++;
    }
    cout << ans << endl;
  }
}
