#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T>
using V = vector<T>;
template <class T, class U>
using P = pair<T, U>;
using vll = V<ll>;
using vvll = V<vll>;
template <class T>
inline bool chmax(T& a, T b) {
  if (a < b) {
    a = b;
    return true;
  }
  return false;
}
template <class T>
inline bool chmin(T& a, T b) {
  if (a > b) {
    a = b;
    return true;
  }
  return false;
}
const ll MOD = 1000000007;
const ll HIGHINF = (ll)1e18;
ll n, m;
vll BIT;
void add(ll a, ll w) {
  for (ll x = a; x <= n; x += x & -x) BIT[x] += w;
}
ll sum(ll a) {
  ll ret = 0;
  for (ll x = a; x > 0; x -= x & -x) ret += BIT[x];
  return ret;
}
int main() {
  cin >> n >> m;
  vll l(n), r(n);
  for (ll i = 0; i < (ll)n; ++i) cin >> l[i] >> r[i];
  BIT.resize(2 * n, 0);
  vll ord(n);
  iota(ord.begin(), ord.end(), 0);
  sort(ord.begin(), ord.end(),
       [&](ll x, ll y) { return r[x] - l[x] < r[y] - l[y]; });
  ll i = 1;
  for (ll d = 1; d < (ll)m + 1; ++d) {
    while (i <= n && r[ord[i - 1]] - l[ord[i - 1]] + 1 == d) {
      add(l[ord[i - 1]], 1);
      add(r[ord[i - 1]] + 1, -1);
      i++;
    }
    ll ans = n - i + 1;
    for (ll j = d; j <= m; j += d) ans += sum(j);
    cout << ans << endl;
  }
  return 0;
}
