#include <bits/stdc++.h>
using namespace std;
const long long inf = (long long)1e9;
const long long linf = (long long)1e18;
const long long mod = (long long)(1e9 + 7);
const long long dx[] = {0, 1, 0, -1};
const long long dy[] = {1, 0, -1, 0};
const long long ddx[] = {0, 1, 1, 1, 0, -1, -1, -1};
const long long ddy[] = {1, 1, 0, -1, -1, -1, 0, 1};
const double eps = 1e-10;
struct oreno_initializer {
  oreno_initializer() {
    cin.tie(0);
    ios::sync_with_stdio(0);
  }
} oreno_initializer;
long long n, m, l, r, a[114514], c, o;
pair<long long, pair<long long, long long> > p[114514];
long long bit[114514];
long long sum(long long i) {
  long long s = 0;
  while (i > 0) {
    s += bit[i];
    i -= i & -i;
  }
  return s;
}
void add(long long i, long long x) {
  while (i <= m) {
    bit[i] += x;
    i += i & -i;
  }
}
signed main() {
  cin >> n >> m;
  for (long long(i) = 0; (i) < (long long)(n); (i)++) {
    cin >> l >> r;
    p[i] = {r - l + 1, {l, r}};
  }
  sort(p, p + n);
  for (long long(d) = (1); (d) <= (long long)(m); (d)++) {
    while (c < n && p[c].first < d) {
      add(p[c].second.first, 1);
      add(p[c].second.second + 1, -1);
      c++;
    }
    a[d - 1] += n - c;
    for (long long i = 0; i <= m; i += d) a[d - 1] += sum(i);
  }
  for (long long(i) = 0; (i) < (long long)(m); (i)++) cout << a[i] << '\n';
}
