#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>

using namespace std;

#define rep(i, n) for (int i = 0; i < (int)n; i++)
#define orep(i, n) for (int i = 1; i <= (int)n; i++)
#define vec vector

class SegmentTree
{
private:
	int def = 0;
	int n;
	vec<int> data;

	int query_rec(int a, int b, int k, int l, int r) {
		if (r <= a || b <= l) return def;
		if (a <= l && r <= b) return data[k];

		int vl = query_rec(a, b, k * 2 + 1, l, (l + r) / 2);
		int vr = query_rec(a, b, k * 2 + 2, (l + r) / 2, r);
		return func(vl, vr);
	}

	int func(int vl, int vr) {
		return vl + vr;
	}


public:
	SegmentTree(int n_) {
		n = 1;
		while(n < n_) n *= 2;
		data.resize(2 * n - 1);
		rep(i, data.size()) data[i] = def;
	}

	void update(int k, int a) {
		k += n - 1;
		data[k] += a;
		while(k > 0) {
			k = (k - 1) / 2;
			data[k] = func(data[k * 2 + 1], data[k * 2 + 2]);
		}
	}

	int query(int a, int b) {
		return func(a, b, 0, 0, n);
	}
};

int main(void)
{
	int n, m;
	cin >> n >> m;
	vec<pair<int, int>> a(n);
	rep(i, n) cin >> a[i].first >> a[i].second;
	sort(a.begin(), a.end(), [](pair<int, int> p, pair<int, int> q) {
			return p.second - p.first < q.second - q.first;
			});
	SegmentTree data(m + 1);
	int c = 0;
	orep(i, m) {
		while(c < n && a[c].second - a[c].first + 1 < i) {
			data.update(a[c].first - 1, 1);
			data.update(a[c].second, - 1);
			c++;
		}
		int ans = n - c;
		orep(j, m / i) ans += data.query(0, i * j);
		cout << ans << endl;
	}
	return 0;
}