#include <bits/stdc++.h>
using namespace std;
const long long INF =
    sizeof(long long) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const long long MOD = (long long)(1e9) + 7;
using pii = pair<long long, long long>;
template <typename T, typename S>
istream &operator>>(istream &is, pair<T, S> &p) {
  is >> p.first >> p.second;
  return is;
}
template <typename T>
void printvv(const vector<vector<T>> &v) {
  cerr << endl;
  for (long long i = (0); i < (v.size()); i++)
    for (long long j = (0); j < (v[i].size()); j++) {
      if (typeid(v[i][j]).name() == typeid(INF).name() and v[i][j] == INF) {
        cerr << "INF";
      } else
        cerr << v[i][j];
      cerr << (j == v[i].size() - 1 ? '\n' : ' ');
    }
  cerr << endl;
}
void YES(bool f) { cout << (f ? "YES" : "NO") << endl; }
void Yes(bool f) { cout << (f ? "Yes" : "No") << endl; }
template <class T, class U>
bool chmin(T &a, U b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
template <class T, class U>
bool chmax(T &a, U b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <typename Monoid>
struct SegmentTree {
  using F = function<Monoid(Monoid, Monoid)>;
  long long sz;
  vector<Monoid> seg;
  const F f;
  const Monoid e;
  SegmentTree(long long n, const F f, const Monoid &e) : f(f), e(e) {
    sz = 1;
    while (sz < n) sz <<= 1;
    seg.assign(2 * sz, e);
  }
  void set(long long k, const Monoid &x) { seg[k + sz] = x; }
  void build() {
    for (long long k = sz - 1; k > 0; k--) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }
  void update(long long k, const Monoid &x) {
    k += sz;
    seg[k] = x;
    while (k >>= 1) {
      seg[k] = f(seg[2 * k + 0], seg[2 * k + 1]);
    }
  }
  Monoid query(long long a, long long b) {
    Monoid L = e, R = e;
    for (a += sz, b += sz; a < b; a >>= 1, b >>= 1) {
      if (a & 1) L = f(L, seg[a++]);
      if (b & 1) R = f(seg[--b], R);
    }
    return f(L, R);
  }
  const Monoid &operator[](const long long &k) const { return seg[k + sz]; }
  Monoid &operator[](const long long &k) { return seg[k + sz]; }
};
signed main(signed argc, char *argv[]) {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(12);
  long long N, M;
  cin >> N >> M;
  vector<long long> l(N), r(N);
  for (long long i = (0); i < (N); i++) {
    cin >> l[i] >> r[i];
  }
  auto f = [](unordered_set<long long> a, unordered_set<long long> b) {
    unordered_set<long long> c;
    c.insert(begin(a), end(a));
    c.insert(begin(b), end(b));
    return c;
  };
  SegmentTree<unordered_set<long long>> seg(M + 1, f,
                                            unordered_set<long long>());
  for (long long d = (1); d < (M + 1); d++) {
    for (long long j = 0; j <= M; j += d) {
      seg[j].insert(d);
    }
  }
  seg.build();
  vector<long long> ans(M + 1);
  for (long long i = (0); i < (N); i++) {
    auto s = seg.query(l[i], r[i] + 1);
    for (auto x : s) {
      ans[x]++;
    }
  }
  for (long long i = (1); i < (M + 1); i++) {
    cout << ans[i] << endl;
  }
  return 0;
}
