#include <bits/stdc++.h>
using namespace std;
static const long long INF = 1ll << 60;
static const long long dx[] = {
    1,
    -1,
    0,
    0,
};
static const long long dy[] = {0, 0, 1, -1};
static const long long mod = 1000000007;
static const long long MAX_M = 100000;
long long dat[MAX_M * 3 * 3], lazy[MAX_M * 3 * 3];
class LazySegmentTree {
 public:
  long long n;
  LazySegmentTree(vector<long long> v) {
    n = 1;
    while (n < v.size()) n *= 2;
    for (long long i = 0; i < v.size(); ++i) dat[n + i - 1] = v[i];
    for (long long i = 0; i < 2 * n - 1; ++i) lazy[i] = 0;
    for (long long i = n - 2; i >= 0; --i)
      dat[i] = dat[2 * i + 1] + dat[2 * i + 2];
  }
  void eval(long long k, long long l, long long r) {
    if (lazy[k] != 0) {
      dat[k] += lazy[k];
      if (r - l > 1) {
        lazy[2 * k + 1] += lazy[k] / 2;
        lazy[2 * k + 2] += lazy[k] / 2;
      }
      lazy[k] = 0;
    }
  }
  void add(long long a, long long b, long long x, long long k, long long l,
           long long r) {
    eval(k, l, r);
    if (b <= l || r <= a) return;
    if (a <= l && r <= b) {
      lazy[k] += (r - l) * x;
      eval(k, l, r);
    } else {
      add(a, b, x, 2 * k + 1, l, (l + r) / 2);
      add(a, b, x, 2 * k + 2, (l + r) / 2, r);
      dat[k] = dat[2 * k + 1] + dat[2 * k + 2];
    }
  }
  long long query(long long a, long long b, long long k, long long l,
                  long long r) {
    eval(k, l, r);
    if (b <= l || r <= a) return 0;
    if (a <= l && r <= b) return dat[k];
    long long vl = query(a, b, 2 * k + 1, l, (l + r) / 2);
    long long vr = query(a, b, 2 * k + 2, (l + r) / 2, r);
    return vl + vr;
  }
};
long long N, M;
long long L[MAX_M * 3], R[MAX_M * 3];
vector<pair<long long, long long> > len[MAX_M * 3];
vector<long long> init(MAX_M * 3, 0);
LazySegmentTree seg(init);
long long pre;
void solve(long long d) {
  long long res = N - (pre + len[d].size());
  pre += len[d].size();
  for (auto v : len[d]) {
    long long l = v.first, r = v.second;
    seg.add(l, r + 1, 1, 0, 0, seg.n);
  }
  long long x = 0, t = 1;
  while (1) {
    if (x > M) break;
    res += seg.query(x, x + 1, 0, 0, seg.n);
    x = d * t;
    t++;
  }
  cout << res << endl;
}
signed main() {
  cin >> N >> M;
  for (long long i = 0; i < N; ++i) {
    cin >> L[i] >> R[i];
    len[R[i] - L[i] + 1].push_back(pair<long long, long long>(L[i], R[i]));
  }
  for (long long i = 1; i <= M; ++i) {
    solve(i);
  }
}
