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

int n,m,x,y,pre;
int fen[N];
vector<int> v[N];

void up(int node,int val) {
	node++;
	while(node-1<=m) {
		fen[node]+=val;
		node+=node&-node;
	}
}

int get(int node) {
	int ret=0;
	node++;
	while(node>=1) {
		ret+=fen[node];
		node-=node&-node;
	}
	return ret;
}

int main() {
	scanf("%d %d",&n,&m);
	for(int i=1;i<=n;i++) {
		scanf("%d %d",&x,&y);
		v[y-x+1].push_back(x);
	}
	for(int i=1;i<=m;i++) {
		int ans=0;
		for(int j=0;j<=m;j+=i) {
			ans+=get(j);
		}
		printf("%d\n",n-pre+ans);
		for(int j=0;j<v[i].size();j++) {
			up(v[i][j],1);
			up(v[i][j]+i,-1);
		}
		pre+=v[i].size();
	}
}

