#include <bits/stdc++.h>
using namespace std;
int n, m, i, j;
vector<pair<int, int> > l;
int main() {
  scanf("%d %d", &n, &m);
  for (i = 0; i < n; i++) {
    int t0, t1;
    scanf("%d %d\n", &t0, &t1);
    l.push_back(make_pair(t0, 2 * i));
    l.push_back(make_pair(t1 + 1, 2 * i + 1));
  }
  sort(l.begin(), l.end());
  j = 0;
  vector<set<int> > eki(m + 1);
  for (i = 1; i <= m; i++) {
    eki[i].insert(eki[i - 1].begin(), eki[i - 1].end());
    while (j < 2 * n && l[j].first == i) {
      if (l[j].second % 2 == 0) {
        eki[i].insert(l[j].second / 2);
      } else {
        eki[i].erase(l[j].second / 2);
      }
      j++;
    }
  }
  for (i = 1; i <= m; i++) {
    set<int> ans;
    for (j = 0; j <= m; j += i) {
      ans.insert(eki[j].begin(), eki[j].end());
    }
    printf("%d\n", (int)ans.size());
  }
}
