#include <bits/stdc++.h>
using namespace std;
template <class T>
void read(T &x) {
  x = 0;
  int f = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') f = ch == '-', ch = getchar();
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (ch ^ 48), ch = getchar();
  x = f ? -x : x;
}
const int N = 1e5 + 5;
struct node {
  int l, r, len;
  bool operator<(const node &A) const { return len < A.len; }
} a[N];
int tree[N << 1], n, m;
inline void add(int x, int v) {
  for (; x <= n; x += x & -x) tree[x] += v;
}
inline int query(int x) {
  int res = 0;
  for (; x > 0; x -= x & -x) res += tree[x];
  return res;
}
int main() {
  read(n), read(m);
  for (int i = 1; i <= n; i++)
    read(a[i].l), read(a[i].r), a[i].len = a[i].r - a[i].l + 1;
  sort(a + 1, a + n + 1);
  int k = 1;
  for (int i = 1; i <= m; i++) {
    int ans = 0;
    while (k <= n && a[k].len <= i) add(a[k].l, 1), add(a[k].r + 1, -1), k++;
    for (int j = i; j <= m; j += i) ans += query(j);
    printf("%d\n", ans + n - k + 1);
  }
  return 0;
}
