#include <cstdio>
#include <set>
#include <iostream>
#include <cstdlib>
#include <algorithm>
#include <cstring>
#include <queue>
#include <map>
 
namespace IO
{
    inline char gc()
    {
        static char s[1<<20|1]={0},*p1=s,*p2=s;
        return (p1==p2)&&(p2=(p1=s)+fread(s,1,1<<20,stdin),p1==p2)?EOF:*(p1++);
    }
//	inline char gc() { return getchar(); }
	inline long long read()
	{
		long long ret=0;bool flag=0;char c=gc();
		while ((c<'0')|(c>'9')) flag ^= !(c^'-'),c=gc();
		while ((c>='0')&(c<='9')) ret=(ret<<1)+(ret<<3)+(c^'0'),c=gc();
		return flag?-ret:ret;
 	}
 	char OutputAns[1<<20|1],*OutputCur = OutputAns;
 	inline void output()
 	{
 		OutputCur -= fwrite(OutputAns,1,OutputCur - OutputAns,stdout);
	}
	inline void print(long long ans)
	{
		char s[20]={0};
		if (OutputCur - OutputAns + sprintf(s,"%lld",ans) >> 20) output();
		OutputCur += sprintf(OutputCur,"%lld",ans);
	}
	inline void printc(char c)
	{
		if (OutputCur - OutputAns + 1 >> 20) output();
		*(OutputCur++) = c;
	}
}
 
using IO::read;
using IO::print;
using IO::output;
using IO::printc;

typedef long long int64;

const int M = 3e5 + 11;

struct Node { unsigned long long l : 18, r : 18; bool operator < (const Node& x) const { return (l == x.l ? r < x.r : l < x.l); } } E[M];

struct Tree { unsigned long long ls : 18, rs : 18, sum : 20; } T[M * 25];

int Rt[M], S[M], End[M];

int n, m, ans, tot;

inline void Insert(int pre, int now, int p, int o = 1, int l = 1, int r = n)
{
	if (l == r) { T[now].sum = T[pre].sum + 1; return ; } int mid = l + r >> 1;
	if (p <= mid) { T[now].ls = ++tot, T[now].rs = T[pre].rs; Insert(T[pre].ls, T[now].ls, p, o<<1, l, mid); }
	else T[now].ls = T[pre].ls, T[now].rs = ++tot, Insert(T[pre].rs, T[now].rs, p, o<<1|1, mid + 1, r);
	T[now].sum = T[T[now].ls].sum + T[T[now].rs].sum;
}

inline int Qu(int pre, int now, int x, int y = n, int o = 1, int l = 1, int r = n)
{
	if (l >= x && r <= y) return T[now].sum - T[pre].sum; int mid = l + r >> 1, res = 0;
	if (x <= mid) res = Qu(T[pre].ls, T[now].ls, x, y, o<<1, l, mid);
	if (y > mid) res += Qu(T[pre].rs, T[now].rs, x, y, o<<1|1, mid + 1, r); return res;
}

inline void Input()
{
	m = read(), n = read(); int cur = 0;
	for (int i = 1;i <= m; ++i) E[i].l = read(), E[i].r = read(); std::sort(E + 1, E + 1 + m);
	for (int i = 1;i <= n; ++i) { S[i] = cur; while (E[cur + 1].l == i) ++cur; End[i] = cur; }
	for (int i = 1;i <= m; ++i) Rt[i] = ++tot, Insert(Rt[i - 1], Rt[i], E[i].r);
}

inline void Solve()
{
	for (int i = 1;i <= n; ++i)
	{
		ans = 0;
		for (int j = i;j <= n; j += i)
			ans += Qu(Rt[S[j - i + 1]], Rt[End[j]], j);
		printf("%d\n", ans);
	}
}

int main(void)
{
	Input();
	Solve();
}