#include<iostream>
#include<algorithm>
using namespace std;
const int MAX=300005;
int tree[MAX],n,m;
pair<int,int> query[MAX];
int cmp(pair<int,int> a,pair<int,int> b)
{
	return a.second-a.first<b.second-b.first;
}
void update(int r,int key)
{
	for(;r<=m;r+=(r&(-r))){
		tree[r]+=key;
	}
}
int getBIT(int r)
{
	int result=0;
	while(r>0){
		result+=tree[r];
		r-=(r&(-r));
	}
	return result;
}
int main()
{
	int a,b;
	cin>>n>>m;
	for(int i=1;i<=n;++i){
		cin>>query[i].first>>query[i].second;
	}
	sort(query+1,query+n+1,cmp);
	int idx=1;
	for(int d=1;d<=m;++d){
		for(;idx<=n&&d>query[idx].second-query[idx].first+1;++idx){
			update(query[idx].first,1);
			update(query[idx].second+1,-1);
		}
		int ans=n-idx+1;
		for(int i=d;i<=m;i+=d){
			ans+=getBIT(i);
		}
		cout<<ans<<endl;
	}
	return 0;
}