#include <bits/stdc++.h>
using namespace std;
using lint = long long int;
template <class T = int>
using V = vector<T>;
template <class T = int>
using VV = V<V<T> >;
template <class T>
void assign(V<T>& v, int n, const T& a = T()) {
  v.assign(n, a);
}
template <class T, class... U>
void assign(V<T>& v, int n, const U&... u) {
  v.resize(n);
  for (auto&& i : v) assign(i, u...);
}
struct M {
  using T = int;
  using U = int;
  static void ap(T& a, const U& g) { a += g; }
  static constexpr U id() { return 0; }
};
template <class M>
struct ST {
  using T = typename M::T;
  using U = typename M::U;
  int n;
  V<T> t;
  V<U> u;
  ST(int n) : n(n) {
    t.resize(n);
    u.assign(n, M::id());
  }
  void _ap(int i, const U& f) {
    if (i < n)
      M::ap(u[i], f);
    else
      M::ap(t[i - n], f);
  }
  T get(int i) {
    T res = t[i];
    for (i += n; i >>= 1;) M::ap(res, u[i]);
    return res;
  }
  void set(int l, int r, const U& f) {
    stack<int> s;
    for (int i = l + n; i >>= 1;) s.push(i);
    for (int i = r + n - 1; i >>= 1;) s.push(i);
    while (!s.empty()) {
      int i = s.top();
      s.pop();
      _ap(2 * i, u[i]);
      _ap(2 * i + 1, u[i]);
      u[i] = M::id();
    }
    for (l += n, r += n; l < r; l >>= 1, r >>= 1) {
      if (l & 1) _ap(l++, f);
      if (r & 1) _ap(--r, f);
    }
  }
};
int main() {
  cin.tie(NULL);
  ios::sync_with_stdio(false);
  int n, m;
  cin >> n >> m;
  struct seg {
    int l, r;
  };
  V<seg> a(n);
  for (int i = 0; i < n; i++) cin >> a[i].l >> a[i].r;
  sort(a.begin(), a.end(), [](seg a, seg b) { return a.r - a.l < b.r - b.l; });
  ST<M> res(m + 1), st(m + 1);
  int i = 0;
  for (int d = 1; d < m + 1; d++) {
    while (i < n and a[i].r - a[i].l + 1 < d) {
      st.set(a[i].l, a[i].r + 1, 1);
      res.set(1, d, 1);
      i++;
    }
    for (int x = 0; x < m + 1; x += d) res.set(d, d + 1, st.get(x));
  }
  for (int d = 1; d < m + 1; d++) cout << res.get(d) << '\n';
}
