#include <bits/stdc++.h>
using ull = unsigned long long;
using namespace std;
const long long INF = 1ll << 60;
const long long MOD = 1e9 + 7;
template <class T>
bool chmin(T& a, const T& b) {
  if (a > b) {
    a = b;
    return 1;
  } else
    return 0;
}
template <class T>
bool chmax(T& a, const T& b) {
  if (a < b) {
    a = b;
    return 1;
  } else
    return 0;
}
void Yes(bool flag = true) {
  if (flag)
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
}
void No(bool flag = true) { Yes(!flag); }
void YES(bool flag = true) {
  if (flag)
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
}
void NO(bool flag = true) { YES(!flag); }
template <typename A, size_t N, typename T>
void Fill(A (&array)[N], const T& val) {
  std::fill((T*)array, (T*)(array + N), val);
}
bool dbg = false;
template <typename Monoid>
struct SegmentTree {
  using F = function<Monoid(Monoid, Monoid)>;
  long long sz;
  vector<Monoid> seg;
  const F f;
  const Monoid M1;
  SegmentTree(long long n, const F f, const Monoid& M1) : f(f), M1(M1) {
    sz = 1;
    while (sz < n) sz <<= 1;
    seg.assign(2 * sz, M1);
  }
  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 = M1, R = M1;
    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);
  }
  Monoid operator[](const long long& k) const { return seg[k + sz]; }
};
long long N, M;
queue<pair<long long, long long> > que[101010];
queue<long long> del[101010];
long long ans[101010];
void solve() {
  SegmentTree<long long> seg(
      M + 10, [](long long a, long long b) { return a + b; }, 0);
  for (long long i = 0; i < (N); ++i) {
    long long l, r;
    cin >> l >> r;
    seg.set(l, seg[l] + 1);
    del[r].push(l);
  }
  seg.build();
  for (long long i = (1); i < (M + 1); ++i) {
    long long x = 0;
    while (true) {
      long long nxt = min(x + i, M + 1);
      que[nxt].push({x + 1, i});
      x = nxt;
      if (x == M + 1) {
        break;
      }
    }
  }
  for (long long x = (1); x < (M + 3); ++x) {
    while (!que[x].empty()) {
      auto [l, idx] = que[x].front();
      que[x].pop();
      ans[idx] += seg.query(l, x + 1);
    }
    while (!del[x].empty()) {
      long long l = del[x].front();
      del[x].pop();
      seg.update(l, seg[l] - 1);
    }
  }
  for (long long i = (1); i < (M + 1); ++i) {
    cout << ans[i] << endl;
  }
}
signed main() {
  cin.tie(nullptr);
  ios::sync_with_stdio(false);
  cin >> N >> M;
  solve();
  return 0;
}
