// Original C++ solution (slower):
#include<iostream>

#include<fstream>

#include<cstdio>

#include<string>

#include<algorithm>

#include<cmath>

#include<vector>

#include<stack>

#include<climits>

#include<cstring>

#include<queue>

#include<map>

#include<set>

#include<complex>

#include<typeinfo>

using namespace std;



typedef unsigned long long ull;

const int N_MAX = 300000;



struct raqSB{

    int dataSize;

    int bucketSize;

    ull data[N_MAX];

    ull bucket[N_MAX];



    raqSB(const int n){

        bucketSize = (int)sqrt(n) + 1;

        dataSize = bucketSize * bucketSize;

        for (int i=0;i<N_MAX;i++){

            data[i] = 0ull;

            bucket[i] = 0ull;

        }

    }



    void add(int s, int t, int x){

        int ss = s/bucketSize;

        int tt = t/bucketSize;

        if(ss==tt){

            for (int i=s;i<t+1;i++){

                data[i] += x;

            }

        }else{

            for(int i=s;i<(ss+1)*bucketSize;i++){

                data[i] += x;

            }

            for(int i=tt*bucketSize;i<t+1;i++){

                data[i] += x;

            }

            for(int i=ss+1;i<tt;i++){

                bucket[i] += x;

            }

        }

    }



    ull get(int i){

        return data[i] + bucket[i/bucketSize];

    }

};



struct Segment{

    int l, r;

    Segment(const int l, const int r): l(l), r(r) {}

};



int main(){

    int N, M, l, r;

    cin >> N >> M;

    vector< vector<Segment> > segList(M + 1);

    for (int i=0;i<N;i++){

        cin >> l >> r;

        Segment seg(l,r);

        segList[r-l+1].push_back(seg);

    }



    int A = N;

    int B;

    raqSB raqsb(M+1);

    for(int d=1;d<M+1;d++){

        B = 0;

        for (int k=1;d*k<M+1;k++){

            B += raqsb.get(d*k);

        }

        cout << A + B << endl;

        A -= segList[d].size();

        for(int m=0;m<segList[d].size();m++){

            raqsb.add(segList[d][m].l, segList[d][m].r, 1);

        }

    }

    return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

using namespace std;



typedef unsigned long long ull;

typedef long long ll;

typedef pair<int, int> pii;

typedef pair<ll, ll> pll;

typedef pair<double, double> pdd;

const ull mod = 1e9 + 7;

#define REP(i,n) for(int i=0;i<(int)n;++i)



//debug

#define dump(x)  cerr << #x << " = " << (x) << endl;

#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;



template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){

  os << "(" << v.first << ", " << v.second << ")"; return os;

}

template<class T> ostream& operator << (ostream& os, const vector<T> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << " ";} os << v[i];} return os;

}

template<class T> ostream& operator << (ostream& os, const vector<vector<T>> v){

  for(int i = 0; i < v.size(); i++){if(i > 0){os << endl;} os << v[i];} return os;

}



const ll N_MAX = 202020;

struct RAQSB{

	ll N;

	ll sN;

	ll data[N_MAX];

	ll bucket[N_MAX];



	RAQSB(ll n){

		sN = (ll)sqrt(n) + 1;

		N = sN * sN;

		REP(i, N_MAX){

			data[i] = 0;

			bucket[i] = 0;

		}

	}



	void add(ll s, ll t, ll x){

		// add x to range [s, t)

		ll ss = s/sN;

		ll tt = t/sN;

		if(ss==tt){

			for(int i=s;i<t;i++){

				data[i] += x;

			}

		}else{

			for(int i=s;i<(ss+1)*sN;i++){

				data[i] += x;

			}

			for(int i=tt*sN;i<t;i++){

				data[i] += x;

			}

			for(int i=ss+1;i<tt;i++){

				bucket[i] += x;

			}

		}

	}



	ll get_val(ll i){

		return data[i] + bucket[i/sN];

	}

};



int main(){

    cin.tie(0);

    ios::sync_with_stdio(false);



    ll n, m;

    cin >> n >> m;

    RAQSB rs(m+1);

    vector<ll> lens[m+1];

    vector<pll> miya;

    REP(i, n){

    	ll l, r;

    	cin >> l >> r;

    	miya.push_back({l, r});

    	lens[r-l+1].push_back(i);

    }



    ll nagai = n;

    for(int d=1;d<=m;d++){

    	ll res = 0;

    	res += nagai;

    	//dump(res)

    	for(int pos=0;pos<=m;pos+=d){

    		res += rs.get_val(pos);

    	}

    	cout << res << endl;

    	nagai -= lens[d].size();

    	REP(i, lens[d].size()){

    		ll idx = lens[d][i];

    		rs.add(miya[idx].first, miya[idx].second+1, 1);

    	}

    }

    return 0;

}

// Fastest known solution for this problem: