#include <bits/stdc++.h>
using namespace std;
const long long int INF = 1e15;
const long long int MOD = 1e9 + 7;
template <typename T>
class LazySegmentTree {
 private:
  static long long int calc_size(long long int n) {
    long long int m = 1;
    while (m < n) {
      m *= 2;
    }
    return m;
  }
  void eval(long long int i, long long int l, long long int r) {
    if (lazy[i] == 0) {
      return;
    }
    node[i] += (r - l) * lazy[i];
    if (r - l > 1) {
      lazy[i * 2 + 1] += lazy[i];
      lazy[i * 2 + 2] += lazy[i];
    }
    lazy[i] = 0;
  }
  void add(long long int s, long long int t, long long int x, long long int i,
           long long int l, long long int r) {
    eval(i, l, r);
    if (t <= l || r <= s) {
      return;
    }
    if (s <= l && r <= t) {
      lazy[i] += x;
      eval(i, l, r);
      return;
    }
    long long int m = l + (r - l) / 2;
    add(s, t, x, 2 * i + 1, l, m);
    add(s, t, x, 2 * i + 2, m, r);
    node[i] = f(node[2 * i + 1], node[2 * i + 2]);
  }
  T query(long long int s, long long int t, long long int i, long long int l,
          long long int r) {
    eval(i, l, r);
    if (t <= l || r <= s) {
      return init;
    }
    if (s <= l && r <= t) {
      return node[i];
    }
    long long int m = l + (r - l) / 2;
    T vl = query(s, t, i * 2 + 1, l, m);
    T vr = query(s, t, i * 2 + 2, m, r);
    return f(vl, vr);
  }

 public:
  long long int n;
  vector<T> node, lazy;
  T init;
  function<T(T, T)> f;
  LazySegmentTree(long long int n, T init, function<T(T, T)> f)
      : n(calc_size(n)),
        node(calc_size(n) * 2, init),
        lazy(calc_size(n) * 2, 0),
        init(init),
        f(f) {}
  void update(long long int i, const T& x) {
    node[i + n] = x;
    for (long long int j = (i + n) / 2; j > 0; j /= 2) {
      node[j] = f(node[j * 2 + 1], node[j * 2 + 2]);
    }
  }
  T query(long long int s, long long int t) { return query(s, t, 0, 0, n); }
  void add(long long int s, long long int t, long long int x) {
    add(s, t, x, 0, 0, n);
  }
};
bool compare(pair<long long int, long long int> a,
             pair<long long int, long long int> b) {
  return (a.second - a.first) < (b.second - b.first);
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  long long int n, m;
  cin >> n >> m;
  vector<pair<long long int, long long int> > range(n);
  for (long long int i = 0; i < (n); ++i) {
    long long int l, r;
    cin >> l >> r;
    range[i] = {l, r};
  }
  sort((range).begin(), (range).end(), compare);
  long long int r = 0;
  LazySegmentTree<long long int> lst(
      m + 1, 0, [](long long int a, long long int b) { return a + b; });
  for (long long int i = 1; i <= m; i++) {
    while (range[r].second - range[r].first + 1 < i) {
      lst.add(range[r].first, range[r].second + 1, 1);
      r++;
    }
    long long int ans = n - r;
    for (long long int j = i; j <= m; j += i) {
      ans += lst.query(j, j + 1);
    }
    cout << ans << endl;
  }
  return 0;
}
