#include <bits/stdc++.h>
#define N 400010
using namespace std;

inline int read()
{
	int x=0,f=1; char ch=getchar();
	while(ch<'0'||ch>'9'){if(ch=='-')f=-1; ch=getchar();}
	while(ch>='0'&&ch<='9'){x=x*10+ch-'0'; ch=getchar();}
	return x*f;
}
int n,d[N],m;
int main()
{
	n=read(); m=read();
	for(int i=1;i<=n;i++)
	{
		int l=read(), r=read();
		d[r-l]++;
		for(int j=r-l+1;j<=r;j++)
		{
			int jj=(r/(r/j));
			int lb=l/(r/j)+bool(l%(r/j));
			if(lb>jj) continue;
			d[jj+1]--; d[max(lb,j)]++;
			j=jj;
		}
	}
	for(register int i=1;i<=m;i++) d[i]+=d[i-1];
	for(register int i=1;i<=m;i++) printf("%d\n",d[i]);
	return 0 ;
}