#include<bits/stdc++.h>
#define N 300005
using namespace std;
vector<int> G[N];
int n,m,l[N],r[N],now,ans,tr[N];
void M(int x,int d){ while(x<=m) tr[x]+=d,x+=(x&(-x));}
int Q(int x){ int s=0; while(x) s+=tr[x],x-=(x&(-x)); return s;}
int main()
{
	int i,j;
	scanf("%d %d",&n,&m);
	for(i=1;i<=n;i++){
		scanf("%d %d",&l[i],&r[i]);
		G[r[i]-l[i]+1].push_back(l[i]);
	  }
	now=n;
	for(i=1;i<=m;i++){
		now-=G[i-1].size(),ans=now;
		for(j=0;j<G[i-1].size();j++)
			M(G[i-1][j],1),M(G[i-1][j]+i-1,-1);
		for(j=i;j<=m;j+=i) ans+=Q(j);
		printf("%d\n",ans);
	  }
	return 0;
}
