#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, m;
  cin >> n >> m;
  vector<int> l(n), r(n);
  for (int i = 0; i < n; i++) cin >> l[i] >> r[i];
  for (int i = 1; i <= m; i++) {
    int cnt = 0;
    for (int j = 0; j < n; j++) {
      if (r[j] / i - (l[j] - 1) / i > 0) cnt++;
    }
    cout << cnt << endl;
  }
  return 0;
}
