#include<bits/stdc++.h>
#define N 400010
#define RG register
#define ls (x<<1)
#define rs (x<<1|1)
#define mid ((l+r)>>1)
using namespace std;
int m,n,ans,tr[N<<2];
struct node{
    int l,r;
    bool operator < (const node &x) const{
	return r-l<x.r-x.l;
    }
}good[N];
inline int gi(){
    RG int x=0;RG char c=getchar();
    while(c<'0'||c>'9') c=getchar();
    while(c>='0'&&c<='9') x=x*10+c-'0',c=getchar();
    return x;
}
inline void pushdown(RG int x){
    tr[ls]+=tr[x];tr[rs]+=tr[x];tr[x]=0;
}
inline int query(RG int x,RG int l,RG int r,RG int g){
    if(l<r&&tr[x]) pushdown(x);
    if(l==r)   return tr[x];
    if(g<=mid) return query(ls,l,mid,g);
    else       return query(rs,mid+1,r,g);
}
inline void add(RG int x,RG int l,RG int r,RG int ll,RG int rr){
    if(l<r&&tr[x]) pushdown(x);
    if(l==ll&&r==rr){++tr[x];return;}
    if(rr<=mid)     add(ls,l,mid,ll,rr);
    else if(ll>mid) add(rs,mid+1,r,ll,rr);
    else            add(ls,l,mid,ll,mid),add(rs,mid+1,r,mid+1,rr);
}
int main(){
    n=gi();m=gi();
    for (RG int i=1;i<=n;++i){
	good[i].l=gi();
	good[i].r=gi();
    }
    sort(good+1,good+n+1);
    for (RG int i=1,j=1;i<=n&&j<=m;++i){
	if(good[i].r-good[i].l>good[i-1].r-good[i-1].l)
	    for (;j<=good[i].r-good[i].l+1;++j){
		ans=0;
		for (RG int k=j;k<=m;k+=j)
		    ans+=query(1,1,m,k);
		printf("%d\n",ans+n-i+1);
	    }
	add(1,1,m,good[i].l,good[i].r);
    }
    for (RG int i=good[n].r-good[n].l+2;i<=m;++i){
	ans=0;
	for (RG int j=i;j<=m;j+=i)
	    ans+=query(1,1,m,j);
	printf("%d\n",ans);
    }
    return 0;
}