#include <bits/stdc++.h>
using namespace std;
const int inf = 1e9 + 7;
const long long INF = 1LL << 60;
const long long mod = 1e9 + 7;
const long double eps = 1e-8;
const long double pi = acos(-1.0);
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return 1;
  }
  return 0;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return 1;
  }
  return 0;
}
template <typename T, typename S>
struct LazySegmentTree {
 private:
  int n;
  vector<T> node;
  vector<S> lazy;
  T E0;
  S E1;
  inline void updatef(S& lazy, S& value) { lazy += value; }
  inline void calculatef(T& node, S& lazy, int len) { node += lazy * len; }
  inline T queryf(T& x, T& y) { return x + y; }

 public:
  LazySegmentTree(int sz, T nodeE, S lazyE) : E0(nodeE), E1(lazyE) {
    n = 1;
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, E0);
    lazy.resize(2 * n - 1, E1);
  }
  LazySegmentTree(vector<T>& v, T E0, S E1) : E0(E0), E1(E1) {
    n = 1;
    int sz = v.size();
    while (n < sz) n <<= 1;
    node.resize(2 * n - 1, E0);
    lazy.resize(2 * n - 1, E1);
    for (int i = 0; i < sz; i++) node[i + n - 1] = v[i];
    for (int i = n - 2; i >= 0; --i) {
      node[i] = queryf(node[2 * i + 1], node[2 * i + 2]);
    }
  }
  void eval(int k, int l, int r) {
    if (lazy[k] == E1) return;
    calculatef(node[k], lazy[k], r - l);
    if (r - l > 1) {
      updatef(lazy[2 * k + 1], lazy[k]);
      updatef(lazy[2 * k + 2], lazy[k]);
    }
    lazy[k] = E1;
  }
  void update(int a, int b, S x, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (r <= a || b <= l) return;
    if (a <= l && r <= b) {
      updatef(lazy[k], x);
      eval(k, l, r);
    } else {
      update(a, b, x, 2 * k + 1, l, (l + r) / 2);
      update(a, b, x, 2 * k + 2, (l + r) / 2, r);
      node[k] = queryf(node[2 * k + 1], node[2 * k + 2]);
    }
  }
  T query(int a, int b, int k = 0, int l = 0, int r = -1) {
    if (r < 0) r = n;
    eval(k, l, r);
    if (r <= a || b <= l) return E0;
    if (a <= l && r <= b) return node[k];
    T xl = query(a, b, 2 * k + 1, l, (l + r) / 2);
    T xr = query(a, b, 2 * k + 2, (l + r) / 2, r);
    return queryf(xl, xr);
  }
};
using meisan = pair<int, pair<int, int>>;
void solve() {
  int n, m;
  cin >> n >> m;
  vector<meisan> ms;
  for (int i = 0; i < n; i++) {
    int l, r;
    cin >> l >> r;
    ms.push_back(make_pair(r - l + 1, make_pair(l, r + 1)));
  }
  sort(ms.begin(), ms.end());
  LazySegmentTree<int, int> sg(m + 1, 0, 0);
  int j = 0;
  for (int d = 1; d <= m; ++d) {
    while (j < n && ms[j].first < d) {
      sg.update(ms[j].second.first, ms[j].second.second, 1);
      ++j;
    }
    int res = n - j;
    for (int k = 0; k <= m; k += d) {
      if (sg.query(k, k + 1)) res++;
    }
    cout << res << endl;
  }
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  return 0;
}
