#include<stdio.h>
#include<algorithm>
#define N (300010)
int d[N],l[N],r[N],n,m,p[N];
struct ds{
	int c[N];
	void add(int x, int y ,int a){
		for (;x<N;x+=x&-x){
			c[x]+=a;
		}
		for (y++;y<N;y+=y&-y){
			c[y]-=a;
		}
	}
	int sum(int x){
		int res=0;
		for (;x;x-=x&-x){
			res+=c[x];
		}
		return res;
	}
	void init(void){
		for (int i=0;i<N;i++){
			c[i]=0;
		}
	}
} c2;
bool cmp(int &a, int &b){
	return d[a]<d[b];
}
int main(){
	scanf("%d%d",&n,&m);
	for (int i=1;i<=n;i++){
		scanf("%d%d",l+i,r+i);
		d[i]=r[i]-l[i]+1;
		p[i]=i;
	}
	std::sort(p+1,p+n+1,cmp);
	c2.init();
	for (int i=1,rr=1;i<=m;i++){
		while (rr<=n&&d[p[rr]]<i){
			c2.add(l[p[rr]],r[p[rr]],1);
			rr++;
		}
		int ans=n-rr+1;
		for (int j=i;j<=m;j+=i){
			ans+=c2.sum(j);
		}
		printf("%d\n",ans);
	}
}