#include <bits/stdc++.h>
using namespace std;
vector<pair<int, pair<int, int> > > item;
int main(void) {
  int n, m;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    int l, r;
    scanf("%d%d", &l, &r);
    item.push_back(pair<int, pair<int, int> >(r - l + 1, pair<int, int>(l, r)));
  }
  sort(begin(item), end(item));
  for (int i = 1; i <= m; i++) {
    int res = n;
    for (auto it : item) {
      if (it.first >= i) break;
      if (0 != (it.second.first % i) &&
          ((it.second.first % i) <= (it.second.second % i)))
        res--;
    }
    printf("%d\n", res);
  }
  return 0;
}
