// Slower C++ solution:
#include<iostream>

#include<cstdio>

#include<cstring>

#include<algorithm>

#include<vector>

#define pii pair<int,int>

#define fi first

#define se second

#define pb push_back

#define mp make_pair

using namespace std;

inline int read(){

	int f=1,ans=0;char c=getchar();

	while(c<'0'||c>'9'){if(c=='-')f=-1;c=getchar();}

	while(c>='0'&&c<='9'){ans=ans*10+c-'0';c=getchar();}

	return ans*f;

}

const int MAXN=300001;

int N,M,tot;

struct BIT{

	int Ans[MAXN];

	int lowbit(int x){return x&-x;}

	void Modify(int x,int w){for(;x<=N;x+=lowbit(x)) Ans[x]+=w;}

	int Query(int x){int res=0;for(;x;x-=lowbit(x)) res+=Ans[x];return res;}

	void Add(int l,int r,int w){tot++;Modify(l,w),Modify(r+1,-w);return;}

}T;

vector<pii> vec[MAXN];

int main(){

	M=read(),N=read();

	for(int i=1;i<=M;i++){int l=read(),r=read();vec[r-l+1].pb(mp(l,r));}

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

		int cur=i-1;for(int j=0;j<vec[cur].size();j++) T.Add(vec[cur][j].fi,vec[cur][j].se,1);

		int Ans=M-tot;for(int j=i;j<=N;j+=i) Ans+=T.Query(j);printf("%d\n",Ans);

	}return 0;

}


// Faster C++ solution for the same problem (measured speedup: 9.21746902552337x):
#include <bits/stdc++.h>



using namespace std;



const int MaxN = 300005;



struct SegmentTree

{

    vector<int> Val, Low, High, Leaf;

    void Build(int x, int Left, int Right)

    {

        Low[x] = Left;

        High[x] = Right;

        if (Left == Right)

        {

            Leaf[Left] = x;

            return;

        }

        int Mid = (Left + Right) / 2;

        Build(x * 2, Left, Mid);

        Build(x * 2 + 1, Mid + 1, Right);

    }

    void Update(int x, int Left, int Right, int val)

    {

        if(Low[x] > Right || High[x] < Left)

        {

            return;

        }

        if (Low[x] >= Left && High[x] <= Right)

        {

            Val[x] += val;

            return;

        }

        Update(x * 2, Left, Right, val);

        Update(x * 2 + 1, Left, Right, val);

    }

    int Get(int x)

    {

        x = Leaf[x];

        int Resuft = 0;

        while (x > 0)

        {

            Resuft += Val[x];

            x /= 2;

        }

        return Resuft;

    }

    void Init(int n)

    {

        Val.assign(n * 4 + 5, 0);

        Low.assign(n * 4 + 5, 0);

        High.assign(n * 4 + 5, 0);

        Leaf.assign(n + 5, 0);

        Build(1, 1, n);

    }

};



int n, m;

pair<int, int> a[MaxN];

int Resuft[MaxN];

SegmentTree ST;



bool cmp(pair<int, int> x, pair<int, int> y)

{

    return (x.second - x.first) > (y.second - y.first);

}



int main()

{

    ios_base::sync_with_stdio(false);

    cin.tie(0);

    cout.tie(0);

    cin >> n >> m;

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

    {

        cin >> a[i].first >> a[i].second;

    }

    ST.Init(m);

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

    int j = n;

    Resuft[1] = n;

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

    {

        while (a[j].second - a[j].first + 1 < i && j >= 1)

        {

            ST.Update(1, a[j].first, a[j].second, 1);

            j--;

        }

        Resuft[i] = j;

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

        {

            Resuft[i] += ST.Get(k);

        }

    }

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

    {

        cout << Resuft[i] << '\n';

    }

    

    return 0;

}