#include<bits/stdc++.h>
#define rep(i,j,k) for(int i=(int)j;i<=(int)k;i++)
#define per(i,j,k) for(int i=(int)j;i>=(int)k;i--)
#define pii pair<int,int>
#define fi first
#define se second
#define pb push_back
using namespace std;
typedef long long LL;
const int N=310000;
vector<int>dj[N];
int ans[N];
int l[N],r[N],n,m;
vector<int>lk[N];
int cnt[N];
inline void add(int x){
	for(;x<=m;x+=(x&(-x)))cnt[x]++;
}
inline int ask(int x){
	int ans=0;
	for(;x;x-=(x&(-x)))ans+=cnt[x];
	return ans;
}
int main(){
	scanf("%d%d",&n,&m);
	rep(i,1,n)scanf("%d%d",&l[i],&r[i]);
	rep(d,1,m){
		for(int i=d;i<=m;i+=d)dj[i].push_back(d);
	}
	rep(i,1,n)lk[r[i]].push_back(l[i]);
	per(i,m,1){
		rep(j,0,lk[i].size()-1){
			add(lk[i][j]);
		}
		rep(j,0,dj[i].size()-1){
			ans[dj[i][j]]+=ask(i);
			ans[dj[i][j]]-=ask(max(i-dj[i][j],0));
		}
	}
	rep(i,1,m)printf("%d\n",ans[i]);
	return 0;
}



