#include <bits/stdc++.h>
#include "../lib/lazysegmenttree/lazy_segtree_add_sum.hpp"

using namespace std;

#define SZ(x) (int)(x.size())

using ll = long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vll = vector<ll>;
using vvll = vector<vector<ll>>;
const double eps = 1e-10;
const int MOD = 1000000007;
const int INF = 1000000000;
const ll LINF = 1ll<<50;

template<typename T>
void printv(const vector<T>& s) {
  for(int i=0;i<(int)(s.size());++i) {
    cout << s[i];
    if(i == (int)(s.size())-1) cout << endl;
    else cout << " ";
  }
}

int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cout << fixed << setprecision(10);

  int n, m; cin >> n >> m;
  vector<vector<P>> v(m+1);
  for(int i=0;i<n;++i) {
    int l, r; cin >> l >> r;
    v[r-l+1].push_back({l, r});
  }

  LazySegmentTreeAddSum st(vll(m+1));

  ll su = n;
  for(int i=1;i<=m;++i) {
    
    for(int j=0;j<SZ(v[i]);++j) {
      su--;
      st.add(v[i][j].first, v[i][j].second + 1, 1);
    }

    int pos = 0;
    int ans = su;
    while(pos <= m) {
      ans += st.getsum(pos, pos+1);
      //cout << i << ":" << pos << ":" << ans << endl;
      pos += i;
    }
    cout << ans << endl;
  }
}
