#include <bits/stdc++.h>
using namespace std;
struct edge {
  int from, to;
  long long cost;
};
signed main() {
  int n, m;
  cin >> n >> m;
  vector<int> ans(m + 1, 0);
  int l, r;
  for (int i = 0; i < n; i++) {
    cin >> l >> r;
    for (int mi = 1; mi <= r; mi++) {
      if (l / mi != r / mi || l % mi == 0) {
        ans[mi]++;
      }
    }
  }
  for (int i = 1; i <= m; i++) {
    cout << ans[i] << endl;
  }
}
