#include <bits/stdc++.h>
using namespace std;

#define _p(...) (void)printf(__VA_ARGS__)
#define forr(x,arr) for(auto&& x:arr)
#define _overload3(_1,_2,_3,name,...) name
#define _rep2(i,n) _rep3(i,0,n)
#define _rep3(i,a,b) for(int i=int(a);i<int(b);++i)
#define rep(...) _overload3(__VA_ARGS__,_rep3,_rep2,)(__VA_ARGS__)
#define _rrep2(i,n) _rrep3(i,0,n)
#define _rrep3(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define rrep(...) _overload3(__VA_ARGS__,_rrep3,_rrep2,)(__VA_ARGS__)
#define all(x) (x).begin(), (x).end()
#define bit(n) (1LL<<(n))
#define sz(x) ((int)(x).size())
#define fst first
#define snd second
using ll=long long;using pii=pair<int,int>;
using vb=vector<bool>;using vs=vector<string>;
using vi=vector<int>;using vvi=vector<vi>;using vvvi=vector<vvi>;
using vl=vector<ll>;using vvl=vector<vl>;using vvvl=vector<vvl>;
using vd=vector<double>;using vvd=vector<vd>;using vvvd=vector<vvd>;
using vpii=vector<pii>;using vvpii=vector<vpii>;using vvvpii=vector<vvpii>;
template<typename T>T read(){T t;cin>>t;return t;}
template<class T,class U>ostream&operator<<(ostream&o,const pair<T,U>&p){return o<<'('<<p.fst<<", "<<p.snd<<')';}
template<class T>ostream&operator<<(ostream&o,const vector<T>&t){o<<"{";rep(i,sz(t))o<<t[i]<<",";o<<"}";return o;}
#define out(args...){vector<string> a_r_g_s=__split(#args, ','); e_r_r(a_r_g_s.begin(), args); }
vector<string> __split(const string& s,char c){vector<string>v;stringstream ss(s);string x;while(getline(ss,x,c))v.emplace_back(x);return move(v);}
void e_r_r(vector<string>::iterator it) {}
template<typename T,typename... Args> void e_r_r(vector<string>::iterator it, T a, Args... args){if(*it==" 1"||*it=="1")cerr<<endl;else cerr<<it->substr((*it)[0]==' ',it->length())<<" = "<<a<<", ";e_r_r(++it, args...);}

// accessible for range [0, n)
template <typename T> struct BinaryIndexedTree0 {
  const int N;
  vector<T> val;

  BinaryIndexedTree0(int N) : N(N), val(N) {}

  // sum of [0, i)
  // v[0] + v[1] + ... + v[i-1]
  T sum(int i) const {
    T s = 0;
    --i;
    if (i >= N) i = N - 1;
    for (; i >= 0; i = (i & (i + 1)) - 1) s += val[i];
    return s;
  }

  // sum of [l, r)
  // v[l] + v[l+1] + ... + v[r-1]
  T sum(int l, int r) const {
    return sum(r) - sum(l);
  }

  // v[i] += x
  void add(int i, T x) {
    for (; i < N; i |= i + 1) val[i] += x;
  }

  // v[i] = x
  void set(int i, T x) {
    T c = sum(i, i + 1);
    add(i, x - c);
  }

  // leftmost i where sum(i) >= w
  int lower_bound(T w) {
    int x = 0;

    for (int k = (1 << (31 - __builtin_clz(N))) - 1; ; k >>= 1) {
      if (x + k < N && val[x + k] < w) {
        w -= val[x + k];
        x += k + 1;
      }
      if (k == 0) break;
    }
    return x;
  }
};

template <class T> struct BinaryIndexedTree0Imos {
  BinaryIndexedTree0<T> a, b;
  BinaryIndexedTree0Imos(int N) : a(N), b(N) {}

  int size() const { return a.size(); }
  T sum(int r) const { return a.sum(r) + b.sum(r) * r; }
  T sum(int l, int r) const { return sum(r) - sum(l); }
  void add(int r, const T &x) { a.add(r, x*r); b.add(r, -x); }
  void add(int l, int r, const T &x) { add(l, -x); add(r, x); }
};

void Main() {
  int n = read<int>();
  int m = read<int>();

  vvi len_lef(m+1);
  rep(i, n) {
    int l = read<int>();
    int r = read<int>() + 1;
    int len = r - l;
    len_lef[len].push_back(l);
  }

  vi LC(m+1);
  rep(i, 1, m+1) LC[i] += sz(len_lef[i]);
  vector<ll> RC(sz(LC)+1);
  rep(ii, sz(LC)) RC[ii+1] = RC[ii] + LC[ii];

  BinaryIndexedTree0Imos<int> bimos(m+1);
  vi C(m+1);
  vi ans(m+1);

  rep(d, 1, m+1) {
    int u1 = n - RC[d-1+1];
    int d1 = 0;
    for (int i = 0; i <= m; i+= d) {
      d1 += bimos.sum(i, i+1);
    }
    ans[d] = u1 + d1;
    forr(lef, len_lef[d]) {
      bimos.add(lef, lef + d, 1);
    }
  }

  rep(i, 1, m+1) {
    _p("%d\n", ans[i]);
  }

}
int main() { cin.tie(nullptr); ios::sync_with_stdio(false); Main(); return 0; }


Measured memory_bytes: 9216