#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <typename T>
using V = vector<T>;
constexpr int Mod = 998244353;
constexpr int mod = 1e9 + 7;
constexpr ll inf = 1LL << 60;
template <typename T>
constexpr bool chmax(T &a, const T &b) {
  if (a >= b) return false;
  a = b;
  return true;
}
template <typename T>
constexpr bool chmin(T &a, const T &b) {
  if (a <= b) return false;
  a = b;
  return true;
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int n, m;
  cin >> n >> m;
  using B = bitset<300000>;
  V<B> b(m + 1);
  for (ll i = (ll)0; i < (ll)n; i++) {
    int l, r;
    cin >> l >> r;
    b[l].set(i);
    if (r < m) b[r + 1].set(i);
  }
  for (ll i = (ll)0; i < (ll)m; i++) b[i + 1] ^= b[i];
  for (ll i = (ll)0; i < (ll)m; i++) {
    B ans;
    for (int j = 0; j <= m; j += i + 1) ans |= b[j];
    cout << ans.count() << endl;
  }
  return 0;
}
