#include<bits/stdc++.h>
using namespace std;
int read()
{
	int x = 0, w = 0;
	char ch = 0;
	while (!isdigit(ch)) {w |= ch == '-'; ch = getchar();}
	while (isdigit(ch)) {x = (x << 3) + (x << 1) + ch - '0'; ch = getchar();}
	return w ? -x : x;
}
const int M=100010;
const int N=300010;
struct seg_tree
{
	int cnt,l,r;
}t[N<<5];
int cnt_sgt,p[M],n,m;
struct rg
{
	int l,r;
	friend bool operator < (rg a,rg b)
	{
		return a.l<b.l;
	}
}rg[N];
void pushup(int root)
{
	t[root].cnt=t[t[root].l].cnt+t[t[root].r].cnt;
}
void insert(int &root,int l,int r,int x)
{
	t[++cnt_sgt]=t[root],root=cnt_sgt;
	if(l==r) 
	{
		t[root].cnt++;
		return;
	}
	int mid=l+r>>1;
	if(x<=mid) insert(t[root].l,l,mid,x);
	else insert(t[root].r,mid+1,r,x);
	pushup(root);
}
int query(int root1,int root2,int l,int r,int ll,int rr)
{
	if(ll<=l&&r<=rr) return t[root2].cnt-t[root1].cnt;
	int mid=l+r>>1;
	int s=0;
	if(ll<=mid) s+=query(t[root1].l,t[root2].l,l,mid,ll,rr);
	if(rr>mid) s+=query(t[root1].r,t[root2].r,mid+1,r,ll,rr);
	return s;
}
int main(int argc, char const *argv[])
{
	n=read(),m=read();
	for(int i=1;i<=n;++i) rg[i].l=read(),rg[i].r=read();
	sort(rg+1,rg+1+n);
	int q=1;
	for(int i=1;i<=m;++i)
	{
		p[i]=p[i-1];
		while(rg[q].l==i) insert(p[i],1,m,rg[q++].r);
	}
	printf("%d\n",n);
	for(int i=2;i<=m;++i)
	{
		int answer=n,j;
		for(j=i;j<=m;j+=i) answer-=query(p[j-i],p[j-1],1,m,j-i+1,j-1);
		if(j-i+1<=m) answer-=query(p[j-i],p[m],1,m,j-i+1,m);
		printf("%d\n",answer);
	}
	return 0;
}