#include<cstdio>
#include<algorithm>
using namespace std;
const int N=300300,M=100100;
int i,j,k,n,m,ch;
int T[M];
struct cc {
	int l,r;
	bool operator < (const cc &n) const {
		return r-l<n.r-n.l;
	}
} A[N];
void R(int &x) {
	x=0;ch=getchar();
	while (ch<'0' || '9'<ch) ch=getchar();
	while ('0'<=ch && ch<='9') x=x*10+ch-'0',ch=getchar();
}
void W(int x) {
	if (x>=10) W(x/10);
	putchar(x%10+'0');
}
void T_add(int x,int y) {
	for (;x<=m;x+=x&-x) T[x]+=y;
}
int T_query(int x) {
	int y=0;
	for (;x;x-=x&-x) y+=T[x];
	return y;
}
int main() {
	R(n);R(m);
	for (i=1;i<=n;i++) R(A[i].l),R(A[i].r);
	sort(A+1,A+n+1);
	j=1;
	for (i=1;i<=m;i++) {
		while (j<=n && A[j].r-A[j].l+1<i) T_add(A[j].l,1),T_add(A[j].r+1,-1),j++;
		int ans=n-j+1;
		for (k=i;k<=m;k+=i) ans+=T_query(k);
		W(ans);puts("");
	}
}