#include<cstdio>
#include<algorithm>
using namespace std;
const int N=3e5+5;
struct node{
	int l,r;
	bool operator < (const node &b)const{
		return r-l<b.r-b.l;
	}
}a[N];
int n,m,bit[N];
void modify(int x,int v){
	while(x<=m)
		bit[x]+=v,x+=x&-x;
}
int query(int x){
	int res=0;
	while(x)
		res+=bit[x],x^=x&-x;
	return res;
}
int main(){
	scanf("%d%d",&n,&m);
	for(int i=1;i<=n;++i)
		scanf("%d%d",&a[i].l,&a[i].r);
	sort(a+1,a+n+1);
	for(int i=1,j=1;i<=m;++i){
		while(j<=n&&a[j].r-a[j].l<i)
			modify(a[j].l,1),modify(a[j].r+1,-1),++j;
		int res=n+1-j;
		for(int k=i;k<=m;k+=i)
			res+=query(k);
		printf("%d\n",res);
	}
	return 0;
}