#include <bits/stdc++.h>
using namespace std;
using i32 = int32_t;
using i64 = int64_t;
using f64 = double_t;
using str = string;
template <typename T>
using vec = vector<T>;
template <typename T>
using heap = priority_queue<T, vec<T>, greater<T>>;
const i64 MOD = 1000000007;
struct fenwicktree {
  i32 n;
  vec<i64> data;
  fenwicktree(i32 size) : n(size), data(size + 1, 0) {}
  void add(i32 i, i64 x) {
    for (++i; i <= n; i += (i & -i)) data[i] += x;
  }
  i64 sum(i32 i) {
    i64 acc = 0;
    for (++i; 0 < i; i -= (i & -i)) acc += data[i];
    return acc;
  }
};
i32 n, m;
i32 l[100001], r[100001];
vec<i32> c[100001];
i32 main() {
  cin >> n >> m;
  for (i32 i = 0; i < (n); ++i) {
    cin >> l[i] >> r[i];
    c[r[i] - l[i]].emplace_back(i);
  }
  fenwicktree tree = fenwicktree(m + 2);
  i32 shorter = 0;
  cout << n << endl;
  for (i32 d = (2); d <= (m); ++d) {
    for (auto &i : (c[d - 2])) {
      shorter++;
      tree.add(l[i], 1);
      tree.add(r[i] + 1, -1);
    }
    i32 ans = n - shorter;
    for (i32 pos = (0); pos <= (m); pos += (d)) {
      ans += tree.sum(pos);
    }
    cout << ans << endl;
  }
  return 0;
}
