#include <bits/stdc++.h>
using namespace std;
struct node {
  int l, r, len;
  bool operator<(const node &rhs) const { return len < rhs.len; }
} a[(300000 + 5)];
int m, c[(100000 + 5)];
int lowbit(int x) { return x & (-x); }
void Add(int x, int ad) {
  while (x <= m) {
    c[x] += ad;
    x += lowbit(x);
  }
}
int Sum(int x) {
  int ret = 0;
  while (x > 0) {
    ret += c[x];
    x -= lowbit(x);
  }
  return ret;
}
int main() {
  int n;
  scanf("%d%d", &n, &m);
  for (int i = (1); i <= (int)(n); ++i) {
    scanf("%d%d", &a[i].l, &a[i].r);
    a[i].len = a[i].r - a[i].l + 1;
  }
  sort(a + 1, a + n + 1);
  int ans, ap = 1;
  for (int d = (1); d <= (int)(m); ++d) {
    while (ap <= n && a[ap].len < d) {
      Add(a[ap].l, 1);
      Add(a[ap].r + 1, -1);
      ++ap;
    }
    ans = n - ap + 1;
    for (int now = d; now <= m; now += d) ans += Sum(now);
    printf("%d\n", ans);
  }
  return 0;
}
