// Slower C++ solution:
#include<bits/stdc++.h>

using namespace std;



typedef long long ll;

typedef pair<int, int> PII;

typedef pair<int, PII> PIP;



const int MM = 1e9 + 7;

const double eps = 1e-8;

const int MAXN = 2e6 + 10;



int n, m;



void prework(){



}



void read(){



}



vector<PIP> E;



class BITree{

public:

    static const int SIZE = 100010, BIAS = 5;

    long long u[SIZE];

    void clear(){

        memset(u,0,sizeof(u));

    }

    void modify(int x, long long v){

        for(x+=BIAS;x<SIZE;x+=x&-x) u[x]+=v;

    }

    long long getsum(int x){

        long long s=0;

        for(x+=BIAS;x;x-=x&-x) s+=u[x];

        return s;

    }

} honoka;



int ans[MAXN];



void solve(int casi){

	scanf("%d%d", &n, &m);

	for(int i = 1; i <= n; i++){

		int x, y;

		scanf("%d%d", &x, &y);

		E.push_back(PIP(y, PII(-1, x)));

	}

	ans[1] = 0;

	for(int i = 2; i <= m; i++){

		ans[i] = 0;

		for(int j = 0; j < m; j += i){

			E.push_back(PIP(min(j + i - 1, m), PII(i, j + 1)));

		}

	}

	sort(E.begin(), E.end());

	for(int i = 0; i < E.size(); i++){

		if (E[i].second.first < 0){

			honoka.modify(-1, 1);

			honoka.modify(E[i].second.second+1, -1);

		}

		else{

			ans[E[i].second.first] += honoka.getsum(E[i].second.second);

		}

	}

	for(int i = 1; i <= m; i++)

		printf("%d\n", n - ans[i]);

}



void printans(){



}





int main(){

	prework();

	int T = 1;

//	cin>>T;

	for(int i = 1; i <= T; i++){

		read();

		solve(i);

		printans();

	}

	return 0;

}






// Faster C++ solution for the same problem (measured speedup: 5.060100703151146x):
#include<cstdio>

#include<algorithm>

#include<cstring>

using namespace std;

int sum[400005],lazy[400005],a[300005],n,m;;

struct obj

{

    int l,r;

}p[300005];

bool cmp(obj x,obj y)

{

    return x.r-x.l<y.r-y.l;

}

void build(int k,int l,int r)

{

    lazy[k]=0;

    if(l==r)

    {

        sum[k]=a[l];

    }

    else

    {

        int mid=(l+r)>>1;

        build(k<<1,l,mid);

        build(k<<1|1,mid+1,r);

        sum[k]=sum[k<<1]+sum[k<<1|1];

    }

}

void push_down(int k,int l,int r)

{

    if(l==r)

    {

        sum[k]+=lazy[k];

        a[l]=sum[k];

    }

    else

    {

        lazy[k<<1]+=lazy[k];

        lazy[k<<1|1]+=lazy[k];

        sum[k]+=lazy[k]*(r-l+1);

    }

    lazy[k]=0;

}

void change(int k,int l,int r,int x,int y,int w)

{

    if(l>=x&&r<=y)

    {

        lazy[k]+=w;

    }

    else

    {

        push_down(k,l,r);

        int mid=(l+r)>>1;

        if(!(y<l||x>mid))

        {                 

            change(k<<1,l,mid,x,y,w);

        }             

        if(!(y<mid+1||x>r))

        {                

            change(k<<1|1,mid+1,r,x,y,w);

    	}

    }

}

int query(int k,int l,int r,int x)

{

    push_down(k,l,r);

    if(l==r)

    {

        return a[l];

    }

    int mid=(l+r)>>1;

    if(x<=mid)

    {

        return query(k<<1,l,mid,x);

    }

    return query(k<<1|1,mid+1,r,x);

}

int main()

{

    scanf("%d%d",&n,&m);

    build(1,1,m);

    for(int i=0;i<n;i++)

    {

        scanf("%d%d",&p[i].l,&p[i].r);

    }

    int i=0;

    sort(p,p+n,cmp);

    for(int d=1;d<=m;d++)

    {

        while(i<n&&p[i].r-p[i].l<d)

        {

            change(1,1,m,p[i].l,p[i].r,1);

            i++;

        }

        int ans=n-i;

        for(int k=d;k<=m;k+=d)

        {

            ans+=query(1,1,m,k);

        }

        printf("%d\n",ans);

    }

    return 0;

}