#include <cstdio>
#include <algorithm>
using namespace std;
#define N 2000000
#define M 100050
int n,m,i,j,c[M],b[M];
struct lwn{
	int l,r,opt;
	bool operator < (const lwn &jb)const{
		return r<jb.r||r==jb.r&&opt<jb.opt;
	}
} a[N];
inline int rd()
{
	char ch=getchar();int ret=0;
	while (ch<'0' || ch>'9') ch=getchar();
	while (ch>='0' && ch<='9') ret=(ret<<3)+(ret<<1)+ch-'0',ch=getchar();
	return ret;
}
int main()
{
	n=rd();m=rd();int q=n;
	for (i=1;i<=n;i++) a[i].l=rd(),a[i].r=rd();
	for (i=1;i<=m;i++)
	for (j=0;j<=m/i;j++) n++,a[n].l=i*j,a[n].r=min(i*(j+1)-1,m),a[n].opt=i;
	sort(a+1,a+n+1);int psz=0;
	for (i=1;i<=n;i++) if (a[i].opt){
		int tot=0;
		for (j=a[i].l;j>=1;j-=(j&(-j))) tot+=c[j];
		b[a[i].opt]+=psz-tot;
	}else{
		psz++;
		for (j=a[i].l;j<=m;j+=(j&(-j))) c[j]++;
	}
	for (i=1;i<=m;i++) printf("%d\n",q-b[i]);
	return 0;
}