// Original C++ solution (slower):
#include <bits/stdc++.h>

#define adj_list vector<vi>

#define endl "\n"

#define INF_INT 2e9

#define INF_LL 2e18

#define matmax 25

#define mod 1000000007

#define mp make_pair

#define pb push_back

#define pi pair<int, int>

#define pii pair<int, pair<int, int> >

#define pl pair<ll, ll>

#define pll pair<ll, pair<ll, ll> >

#define vi vector<int>

#define vl vector<ll>

#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

typedef long long int ll;



ll pow1(ll a, ll b, ll m = mod)

{

	if (b == 0)

		return 1ll;

	else if (b == 1)

		return a;

	else

	{

		ll x = pow1(a, b/2, m);

		x *= x;

		x %= m;

		if (b%2)

		{

			x *= a;

			x %= m;

		}

		return x;

	}

}



template <class avgType>

avgType avg(avgType a, avgType b) {

	return (a + b)/2;

}



mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

mt19937_64 rng64(chrono::steady_clock::now().time_since_epoch().count());



int randInt() {

	return rng() % INT_MAX;

}



ll randLL() {

	return rng64() % LLONG_MAX;

}



vector< int > hashmods = {1000000007, 1000000009, 1000000021, 1000000033, 1000000087, 1000000093};



struct segNode {

	bool ign;

	int val;

};



template <class segTreeType, class holderType, class helperType>

class SegmentTree {

	holderType *st, ignore;

	helperType *arr;



	public:	

		SegmentTree(holderType *holderarr, helperType *helparr) {

			st = holderarr;

			arr = helparr;

			ignore.ign = 1;

		}



		holderType function(holderType a, holderType b) {

			holderType c;

			c.val = a.val + b.val;

			c.ign = 0;

			return c;

		}



		void updateVal(int index, segTreeType val) {

			st[index].val += val;

		}



		void init(int a, int index) {

			st[index].val = 0;

		} 



		void build(int a, int b, int index) {

			if (a == b) {

				init(a, index);

			} else {

				build(a, avg(a, b), 2*index);

				build(avg(a, b) + 1, b, 2*index+1);

				st[index] = function(st[2*index], st[2*index+1]);

			}

		}



		void update(int a, int b, int index, int l, int r, segTreeType val) {

			if (a > r or b < l)

				return;

			if (l <= a and b <= r) {

				updateVal(index, val);

			} else {

				update(a, avg(a, b), 2*index, l, r, val);

				update(avg(a, b)+1, b, 2*index+1, l, r, val);

				st[index] = function(st[2*index], st[2*index+1]);

			}

		}



		holderType query(int a, int b, int index, int l, int r) {

			if (a > r or b < l)

				return ignore;

			if (l <= a and b <= r) {

				return st[index];

			} else {

				holderType t1 = query(a, avg(a, b), 2*index, l, r);

				holderType t2 = query(avg(a, b)+1, b, 2*index+1, l, r);

				if (t1.ign)

					return t2;

				if (t2.ign)

					return t1;

				return function(t1, t2);

			}

		}

};	



int n, m, l[310000], r[310000], ans[110000];

segNode st[410000];

vector< vi > ending(110000), starting(110000);

vector< vi > fact(110000);



void init() {

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

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

			fact[j].pb(i);

		}

	}

}



int main() {

	fastio;



	cin>>n>>m;

	init();



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

		cin>>l[i]>>r[i];

		ending[r[i]].pb(l[i]);

		starting[l[i]].pb(l[i]);

	}



	SegmentTree<int, segNode, int> stree(st, NULL);

	stree.build(1, m, 1);



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

		for (int s : starting[i])

			stree.update(1, m, 1, s, s, 1);



		for (int f : fact[i]) {

			int prev = i - f;

			ans[f] += stree.query(1, m, 1, prev+1, i).val;

		}



		for (int e : ending[i])

			stree.update(1, m, 1, e, e, -1);

	}



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

		cout<<ans[i]<<endl;



	return 0;

}

// Optimized solution to the same problem (faster):
#include <bits/stdc++.h>

#define adj_list vector<vi>

#define endl "\n"

#define INF_INT 2e9

#define INF_LL 2e18

#define matmax 25

#define mod 1000000007

#define mp make_pair

#define pb push_back

#define pi pair<int, int>

#define pii pair<int, pair<int, int> >

#define pl pair<ll, ll>

#define pll pair<ll, pair<ll, ll> >

#define vi vector<int>

#define vl vector<ll>

#define fastio ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);

using namespace std;

typedef long long int ll;



ll pow1(ll a, ll b, ll m = mod)

{

	if (b == 0)

		return 1ll;

	else if (b == 1)

		return a;

	else

	{

		ll x = pow1(a, b/2, m);

		x *= x;

		x %= m;

		if (b%2)

		{

			x *= a;

			x %= m;

		}

		return x;

	}

}



template <class avgType>

avgType avg(avgType a, avgType b) {

	return (a + b)/2;

}



mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

mt19937_64 rng64(chrono::steady_clock::now().time_since_epoch().count());



int randInt() {

	return rng() % INT_MAX;

}



ll randLL() {

	return rng64() % LLONG_MAX;

}



vector< int > hashmods = {1000000007, 1000000009, 1000000021, 1000000033, 1000000087, 1000000093};



struct segNode {

	bool ign;

	int val;

};



template <class segTreeType, class holderType, class helperType>

class SegmentTree {

	holderType *st, ignore;

	helperType *arr;



	public:	

		SegmentTree(holderType *holderarr, helperType *helparr) {

			st = holderarr;

			arr = helparr;

			ignore.ign = 1;

		}



		holderType function(holderType a, holderType b) {

			holderType c;

			c.val = a.val + b.val;

			c.ign = 0;

			return c;

		}



		void updateVal(int index, segTreeType val) {

			st[index].val += val;

		}



		void init(int a, int index) {

			st[index].val = 0;

		} 



		void build(int a, int b, int index) {

			if (a == b) {

				init(a, index);

			} else {

				build(a, avg(a, b), 2*index);

				build(avg(a, b) + 1, b, 2*index+1);

				st[index] = function(st[2*index], st[2*index+1]);

			}

		}



		void update(int a, int b, int index, int l, int r, segTreeType val) {

			if (a > r or b < l)

				return;

			if (l <= a and b <= r) {

				updateVal(index, val);

			} else {

				update(a, avg(a, b), 2*index, l, r, val);

				update(avg(a, b)+1, b, 2*index+1, l, r, val);

				st[index] = function(st[2*index], st[2*index+1]);

			}

		}



		holderType query(int a, int b, int index, int l, int r) {

			if (a > r or b < l)

				return ignore;

			if (l <= a and b <= r) {

				return st[index];

			} else {

				holderType t1 = query(a, avg(a, b), 2*index, l, r);

				holderType t2 = query(avg(a, b)+1, b, 2*index+1, l, r);

				if (t1.ign)

					return t2;

				if (t2.ign)

					return t1;

				return function(t1, t2);

			}

		}

};	



int n, m, l[310000], r[310000], ans[110000], starting[110000];

segNode st[410000];

vector< vi > ending(110000);

vector< vi > fact(110000);



void init() {

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

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

			fact[j].pb(i);

		}

	}

}



int main() {

	fastio;



	cin>>n>>m;

	init();



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

		cin>>l[i]>>r[i];

		ending[r[i]].pb(l[i]);

		starting[l[i]]++;

	}



	SegmentTree<int, segNode, int> stree(st, NULL);

	stree.build(1, m, 1);



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

		if (starting[i])

			stree.update(1, m, 1, i, i, starting[i]);



		for (int f : fact[i]) {

			int prev = i - f;

			ans[f] += stree.query(1, m, 1, prev+1, i).val;

		}



		for (int e : ending[i])

			stree.update(1, m, 1, e, e, -1);

	}



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

		cout<<ans[i]<<endl;



	return 0;

}

// Fastest known solution for this problem: