#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 10;
int gi() {
  int x = 0, o = 1;
  char ch = getchar();
  while (!isdigit(ch) && ch != '-') ch = getchar();
  if (ch == '-') o = -1, ch = getchar();
  while (isdigit(ch)) x = x * 10 + ch - '0', ch = getchar();
  return x * o;
}
struct dat {
  int l, r;
  bool operator<(const dat &A) const { return r - l < A.r - A.l; }
} p[N];
int n, m, c[N], cnt[N];
void modify(int p, int v) {
  ++p;
  while (p <= m + 1) c[p] += v, p += p & -p;
}
int query(int p) {
  int ret = 0;
  ++p;
  while (p) ret += c[p], p -= p & -p;
  return ret;
}
int main() {
  cin >> n >> m;
  for (int i = 1; i <= n; i++) p[i] = {gi(), gi()}, ++cnt[p[i].r - p[i].l + 1];
  sort(p + 1, p + n + 1);
  for (int i = m; i; i--) cnt[i] += cnt[i + 1];
  for (int i = 1, j = 1; i <= m; i++) {
    while (j <= n && p[j].r - p[j].l + 1 < i)
      modify(p[j].l, 1), modify(p[j].r + 1, -1), ++j;
    int sum = 0;
    for (int k = 0; k <= m; k += i) sum += query(k);
    cout << sum + cnt[i] << '\n';
  }
  return 0;
}
