#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3 * (1e5) + 10, MAXM = (1e5) + 10;
int n, m, diaMul[MAXM], diaAdd[MAXM], ans[MAXM];
priority_queue<pair<int, pair<int, int> > > pq;
void internalUpdate(int i, int mul, int add) {
  while (i <= m) {
    diaMul[i] += mul;
    diaAdd[i] += add;
    i |= (i + 1);
  }
}
void update(int left, int right, int by) {
  internalUpdate(left, by, -by * (left - 1));
  internalUpdate(right, -by, by * right);
}
int query(int i) {
  int mul = 0;
  int add = 0;
  int start = i;
  while (i >= 0) {
    mul += diaMul[i];
    add += diaAdd[i];
    i = (i & (i + 1)) - 1;
  }
  return mul * start + add;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0, l, r; i < n; i++) {
    scanf("%d%d", &l, &r);
    pq.emplace(r - l, make_pair(l, r));
    update(l, r, 1);
  }
  for (int x = m, curr = 0; x >= 1; x--) {
    while (pq.top().first >= x) {
      update(pq.top().second.first, pq.top().second.second, -1);
      curr++;
      pq.pop();
    }
    ans[x] = curr;
    for (int i = 0; i <= m; i += x)
      ans[x] += query(i) - (i > 0 ? query(i - 1) : 0);
  }
  for (int i = 1; i <= m; i++) printf("%d\n", ans[i]);
}
