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

int N, M;
int bit[1000010];
vector<pair<long long, long long> >range[100005];

void add(int a, int w){
	for(int x = a; x < 1000010; x += x & -x){
		bit[x] += w;
	}
}

int sum(int a){
	int ret = 0;
	for(int x = a; x > 0; x -= x & -x){
		ret += bit[x];
	}
	return ret;
}

int main(){
	cin >> N >> M;
	for(long long i = 0; i < N; i++){
		long long l, r;
		cin >> l >> r;
		range[r-l+1].push_back(make_pair(l, r));
	}

	for(long long d = 1; d <= M; d++){
		//add range d - 1, N--;
		for(int i = 0; i < range[d].size(); i++){

			add(range[d][i].first, 1);
			add(range[d][i].second + 1, -1);
			N--;
		}
		long long ans = N;
		for(long long cur = d; cur <= M; cur += d){
			ans += sum(cur);
		}
		cout << ans << endl;
	}
}
