#include <bits/stdc++.h>
using namespace std;
constexpr long long mod = 1000000007;
constexpr long long inf = 1ll << 61;
struct segtree {
  vector<long long> node, lazy;
  long long n;
  void init(long long N) {
    n = 1;
    while (n < N) n *= 2;
    node.resize(n * 2);
    lazy.resize(n * 2);
  }
  void eval(long long k, long long l, long long r) {
    if (!lazy[k]) return;
    node[k] += lazy[k] * (r - l);
    if (k < n - 1) {
      lazy[2 * k + 1] += lazy[k];
      lazy[2 * k + 2] = lazy[k];
    }
    lazy[k] = 0;
  }
  void update(long long a, long long b, long long x, long long k, long long l,
              long long r) {
    eval(k, l, r);
    if (r <= a || b <= l) return;
    if (a <= l && r <= b) {
      lazy[k] = x;
      eval(k, l, r);
      return;
    }
    update(a, b, x, k * 2 + 1, l, (l + r) / 2);
    update(a, b, x, k * 2 + 2, (l + r) / 2, r);
    node[k] = node[k * 2 + 1] + node[k * 2 + 2];
  }
  long long calc(long long a, long long b, long long k, long long l,
                 long long r) {
    eval(k, l, r);
    if (r <= a || b <= l) return 0;
    if (a <= l && r <= b) return node[k];
    long long vl = calc(a, b, k * 2 + 1, l, (l + r) / 2);
    long long vr = calc(a, b, k * 2 + 2, (l + r) / 2, r);
    return vl + vr;
  }
  void add(long long a, long long b, long long x) { update(a, b, x, 0, 0, n); }
  long long getsum(long long a, long long b) { return calc(a, b, 0, 0, n); }
};
vector<pair<long long, long long> > seg[100006];
long long ans[100006];
segtree S;
signed main() {
  long long n, m;
  cin >> n >> m;
  for (long long i = 0; i < n; i++) {
    long long l, r;
    cin >> l >> r;
    seg[r - l + 1].push_back(pair<long long, long long>(l, r));
  }
  long long unused = n;
  S.init(m + 1);
  for (long long i = 1; i <= m; i++) {
    ans[i] += unused;
    unused -= seg[i].size();
    for (long long j = i; j <= m; j += i) {
      ans[i] += S.getsum(j, j + 1);
    }
    for (auto e : seg[i]) {
      S.add(e.first, e.second + 1, 1);
    }
  }
  for (long long i = 0; i < m; i++) cout << ans[i + 1] << endl;
}
