// Slower C++ solution:
//============================================================================

// Name        : test.cpp

// Author      : Qihan

// Version     :

// Copyright   : Your copyright notice

// Description : Hello World in C++, Ansi-style

//============================================================================



#include <bits/stdc++.h>

#define Lowbit(x) (x & (-x))

using namespace std;

typedef long long int LLI;

typedef pair<int,int> PII;

const int maxn = (300000 + 10);



struct Seg{

	int l,r,len;

}op[maxn];



bool cmp(Seg a,Seg b){

	return a.len < b.len;

}



int c[maxn];



void add(int x,int change,int n){

	while(x < n){

		c[x] += change;

		x += Lowbit(x);

	}

}



int sum(int x){

	int ans = 0;

	while(x > 0){

		ans += c[x];

		x -= Lowbit(x);

	}

	return ans;

}



int main(){

//	freopen("/home/qihan/Documents/in","r",stdin);

	int n,m;

	memset(c,0,sizeof(c));

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

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

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

		op[i].len = op[i].r - op[i].l + 1;

	}

	sort(op + 1,op + 1 + n,cmp);

	int k = 1;

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

		for(;k <= n && op[k].len < i;k ++){

			add(op[k].l,1,300000);

			add(op[k].r + 1,-1,300000);

		}

		int ans = n - k + 1;

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

			ans += sum(j);

		}

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

	}

	return 0;

}


// Faster C++ solution for the same problem (measured speedup: 11.1499274183257x):
#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;

}