#include <bits/stdc++.h>
using namespace std;
const int MN = 3e5 + 5;
int n, m, L[MN], R[MN], id[MN];
int d[MN];
inline void update(int x, int v) {
  while (x <= m) d[x] += v, x += (x & -x);
}
inline void update(int l, int r, int v) {
  update(l, v);
  update(r + 1, -v);
}
inline int query(int x) {
  register int res = 0;
  while (x) res += d[x], x -= (x & -x);
  return res;
}
int main() {
  scanf("%d%d", &n, &m);
  for (register int i = 1; i <= n; i++) scanf("%d%d", L + i, R + i), id[i] = i;
  sort(id + 1, id + 1 + n,
       [](int a, int b) { return R[a] - L[a] < R[b] - L[b]; });
  register int cur = 1, Ans;
  for (register int d = 1; d <= m; d++) {
    while (cur <= n && R[id[cur]] - L[id[cur]] + 1 < d)
      update(L[id[cur]], R[id[cur]], 1), cur++;
    Ans = n - cur + 1;
    for (register int i = d; i <= m; i += d) Ans += query(i);
    printf("%d\n", Ans);
  }
  return 0;
}
