#include<cstdio>
#include<cstring>
#include<algorithm>
#define rep(a,b,c) for (int a=b;a<=c;a++)
#define per(a,b,c) for (int a=b;a>=c;a--)
#define go(u) for (int o=ft[u],v;v=E[o].t;o=E[o].n)
#define fi first
#define se second
using namespace std;
typedef long long LL;
typedef pair<int,int> par;
const int N=300010;
int ft[N],a[N],ans[N],n,m,tot;
struct edge{int t,n;}E[N];
void adde(int x,int y){
	E[++tot]=(edge){y,ft[x]},ft[x]=tot;
}
int ask(int x){
	int s=0;
	for (;x;x-=x&-x) s+=a[x];
	return s;
}
void add(int x,int k){
	for (;x<=n+5;x+=x&-x) a[x]+=k;
}
int main(){
	scanf("%d%d",&m,&n);
	rep(i,1,m){
		int x,y;
		scanf("%d%d",&x,&y);
		adde(y-x+1,x);
	}
	int sum=m;
	rep(i,1,n){
		ans[i]=sum;
		for (int j=i;j<=n;j+=i) ans[i]+=ask(j);
		go(i){
			--sum;
			int x=v,y=v+i;
			add(x,1);
			add(y,-1);
		}
		printf("%d\n",ans[i]);
	}
	return 0;
}
