#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef vector<ll> vi;
typedef vector<bool> vb;
typedef vector<vi> vvi;
typedef pair<ll,ll> ii;
typedef vector<ii> vii;
typedef vector<vii> vvii;

#define pb push_back
#define mp make_pair


#define LAZY
struct Segtree {
	ll n;
	vector<ll> data;

#define NOLAZY 0			// Change in + to 0
// #define GET(node) (lazy[node] == NOLAZY ? data[node] : lazy[node])	// Change in + everywhere to data[node] + (tend - tbegin)*lazy[node]
	vector<ll> lazy;

	void build_rec(ll node, ll* begin, ll* end) {
		if (end == begin+1) {
			if (data.size() <= node) data.resize(node+1);
			data[node] = *begin;
		} else {
			ll* mid = begin + (end-begin+1)/2;
			build_rec(2*node+1, begin, mid);
			build_rec(2*node+2, mid, end);
			data[node] = data[2*node+1] + data[2*node+2];			// to + here
		}
	}

	void update_range_rec(ll node, ll tbegin, ll tend, ll abegin, ll aend, ll val) {
		if (tbegin >= abegin && tend <= aend) {
			lazy[node] += val;									// += val here if +
		} else {
			ll mid = tbegin + (tend - tbegin + 1)/2;
			if (lazy[node] != NOLAZY) {
				lazy[2*node+2] += lazy[node];
				lazy[2*node+1] += lazy[node]; 
				lazy[node] = NOLAZY;		// += for each here if +
			}
			if (mid > abegin && tbegin < aend)
				update_range_rec(2*node+1, tbegin, mid, abegin, aend, val);
			if (tend > abegin && mid < aend)
				update_range_rec(2*node+2, mid, tend, abegin, aend, val);
			data[node] = data[2*node+1] + (mid-tbegin)*lazy[2*node+1] + data[2*node+2] + (tend-mid)*lazy[2*node+2];		// change GET
		}
	}

	ll query_rec(ll node, ll tbegin, ll tend, ll abegin, ll aend) {
		if (tbegin >= abegin && tend <= aend) {
			return data[node] + (tend - tbegin)*lazy[node];						
		} else {	

			if (lazy[node] != NOLAZY) {
				data[node] += (tend - tbegin)*lazy[node];
				lazy[2*node+2] += lazy[node];
				lazy[2*node+1] += lazy[node]; 
				lazy[node] = NOLAZY; // += for each here if +
			}

			ll mid = tbegin + (tend - tbegin + 1)/2;	
			ll res = 0;				// change
			if (mid > abegin && tbegin < aend) 
				res += query_rec(2*node+1, tbegin, mid, abegin, aend);
			if (tend > abegin && mid < aend)
				res += query_rec(2*node+2, mid, tend, abegin, aend);
			return res;
		}
	}

	// Create a segtree which stores the range [begin, end) in its bottommost level.
	Segtree(ll* begin, ll* end): n(end - begin) {
		build_rec(0, begin, end);
		lazy.assign(data.size(), NOLAZY);

	}

	// Call this to update range [begin, end), if lazy propagation is enabled. Indices are 0-based.
	void update_range(ll begin, ll end, ll val) {
		update_range_rec(0, 0, n, begin, end, val);
	}

	// Returns minimum in range [begin, end). Indices are 0-based.
	ll query(ll begin, ll end) {
		return query_rec(0, 0, n, begin, end);
	}
};

bool comp(ii x, ii y){
	return (x.second - x.first) < (y.second - y.first);
}

int main(){
	ll n,m;
	cin>>n>>m;
	vii a(n);

	ll b[m+5]; for(ll i=0;i<m+5;i++) b[i] = 0;
	Segtree seg(b, b+m+5);

	for(ll i=0;i<n;i++) cin>>a[i].first>>a[i].second;

	sort(a.begin(), a.end(), comp);

	ll k = 0;
	vi ans(m+1,0);


	for(ll i=1; i<=m; i++){
		while(k < n && a[k].second - a[k].first + 1 < i) {
			seg.update_range(a[k].first, a[k].second + 1, 1);
			// cout<<a[k].first<<" "<<a[k].second<<" update"<<endl;
			k++;
		}
		
		for(ll j = i; j<=m; j+=i){
			ans[i] += seg.query(j, j+1);
			// cout<<i<<" "<<j<<" "<<seg.query(j, j+1)<<endl;
		}
		ans[i] += n - k;
		// cout<<k<<endl;
	}

	for(ll i=1;i<=m;i++) cout<<ans[i]<<endl;

}




Measured memory_bytes: 11260