#include<bits/stdc++.h>
#define LL long long
#define uLL unsigned long long
#define db long double

using namespace std;
const int N=3e5+10;
int rd()
{
	int x=0,w=1;char ch=0;
	while(ch<'0'||ch>'9'){if(ch=='-') w=-1;ch=getchar();}
	while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+(ch^48);ch=getchar();}
	return x*w;
}
struct line
{
	int l,r;
	bool operator < (const line &bb) const {return r-l+1<bb.r-bb.l+1;}
}a[N];
int n,m,bt[N];
void add(int x,int y){while(x<=n) bt[x]+=y,x+=x&(-x);}
int gsm(int x){int an=0;while(x) an+=bt[x],x-=x&(-x);return an;}

int main()
{
	m=rd(),n=rd();
	for(int i=1;i<=m;++i) a[i].l=rd(),a[i].r=rd();
	sort(a+1,a+m+1);
	for(int i=1,j=1;i<=n;++i)
	{
		while(j<=m&&a[j].r-a[j].l+1<=i)
			add(a[j].l,1),add(a[j].r+1,-1),++j;
		int ans=m-j+1;
		for(int d=i;d<=n;d+=i) ans+=gsm(d);
		printf("%d\n",ans);
	}
	return 0;
}
