#include <bits/stdc++.h>
using namespace std;
const long long inf = 1000000000000000000LL;
const int MAXN = 300005;
const int MAXM = 100005;
enum { START, FINISH };
int N, M;
int fid[MAXN];
int f[MAXN];
void update(int i, int v) {
  for (i += 2; i < MAXN; i += i & -i) f[i] += v;
}
int query(int i) {
  int ret = 0;
  for (i += 2; i; i -= i & -i) ret += f[i];
  return ret;
}
void handle(pair<pair<int, int>, int> evt) {
  if (evt.first.second == START)
    update(fid[evt.second], +1);
  else
    update(fid[evt.second], -1);
}
int main(void) {
  scanf("%d%d", &N, &M);
  vector<pair<pair<int, int>, int>> intervals;
  vector<pair<pair<int, int>, int>> events;
  for (int i = (0); i < (N); ++i) {
    int l, r;
    scanf("%d%d", &l, &r);
    intervals.push_back({{l, r}, i});
    events.push_back({{l, START}, i});
    events.push_back({{r, FINISH}, i});
  }
  sort(intervals.begin(), intervals.end());
  sort(events.begin(), events.end());
  for (int i = (0); i < (N); ++i) fid[intervals[i].second] = i;
  for (int d = (1); d < (M + 1); ++d) {
    auto eit = events.begin();
    auto yp = intervals.begin();
    int sol = 0;
    for (int i = 0; i <= M; i += d) {
      while (eit != events.end() && eit->first <= (pair<int, int>){i, START}) {
        handle(*eit);
        ++eit;
      }
      while (yp != intervals.end() && yp->first.first <= i - d) ++yp;
      sol += query(N);
      sol -= query((yp - intervals.begin()) - 1);
      while (eit != events.end() && eit->first <= (pair<int, int>){i, FINISH}) {
        handle(*eit);
        ++eit;
      }
    }
    while (eit != events.end()) {
      handle(*eit);
      ++eit;
    }
    printf("%d\n", sol);
  }
  return 0;
}
