#include <bits/stdc++.h>
using namespace std;
struct arr {
  int l, r;
} e[300006];
int n, x, m, ans, tot, p, f[300006], g[300006], ls[20 * 300006],
    rs[20 * 300006], t[300006], s[300006];
bool operator<(arr x, arr y) { return x.l < y.l; }
int build(int l, int r) {
  int mid = (l + r) >> 1, rt = ++tot;
  if (l == r) return rt;
  ls[rt] = build(l, mid);
  rs[rt] = build(mid + 1, r);
  return rt;
}
void add(int rt, int nrt, int l, int r, int x) {
  s[nrt] = s[rt] + 1;
  int mid = (l + r) >> 1;
  if (l == r) return;
  if (x <= mid) {
    ls[nrt] = ++tot;
    rs[nrt] = rs[rt];
    add(ls[rt], ls[nrt], l, mid, x);
  } else {
    rs[nrt] = ++tot;
    ls[nrt] = ls[rt];
    add(rs[rt], rs[nrt], mid + 1, r, x);
  }
}
int query(int lrt, int rrt, int l, int r, int x, int y) {
  if (x <= l && r <= y) return s[rrt] - s[lrt];
  int mid = (l + r) >> 1, tmp = 0;
  if (x <= mid) tmp = query(ls[lrt], ls[rrt], l, mid, x, y);
  if (y > mid) tmp += query(rs[lrt], rs[rrt], mid + 1, r, x, y);
  return tmp;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= n; i++) scanf("%d%d", &e[i].l, &e[i].r), f[e[i].l]++;
  sort(e + 1, e + n + 1);
  for (int i = 1, h = 1; i <= m; i++) {
    while (e[h].l < i && h < n) h++;
    g[i] = h;
  }
  for (int i = 1; i <= m; i++) f[i] += f[i - 1];
  t[0] = build(1, m);
  for (int i = 1; i <= n; i++) t[i] = ++tot, add(t[i - 1], t[i], 1, m, e[i].r);
  for (int i = 1; i <= m; i++) {
    int ans = 0;
    for (int j = i, h = 0; j <= m; h = j, j += i) {
      int tmp = 0, p = max(g[h + 1] - 1, g[h]);
      if (h + 1 <= j - 1) tmp = query(t[p], t[g[j]], 1, m, h + 1, j - 1);
      ans += f[j] - f[h] - tmp;
    }
    printf("%d\n", ans);
  }
}
