#include <vector>
#include <iostream>
#include <algorithm>
#pragma warning(disable : 4996)
using namespace std;
int N, M, l[300009], r[300009], c[300009]; vector<int> d[100009], lc[100009], rc[100009];
int main() {
	cin >> N >> M;
	for (int i = 0; i < N; i++) {
		scanf("%d%d", &l[i], &r[i]), l[i]--, c[i] = r[i] - l[i];
		lc[l[i]].push_back(i);
		rc[r[i]].push_back(i);
	}
	for (int i = 1; i <= M; i++) {
		int B = sqrt(i);
		for (int j = 1; j <= B; j++) {
			int x = i / j;
			d[x].push_back(i);
		}
		int z = i / B;
		for (int j = 1; j < z; j++) {
			if (i / j != i / (j + 1)) {
				d[j].push_back(i);
			}
		}
	}
	for (int i = 1; i <= M; i++) {
		sort(d[i].begin(), d[i].end());
		d[i].erase(unique(d[i].begin(), d[i].end()), d[i].end());
	}
	int ret = N;
	for (int i = 1; i <= M; i++) {
		printf("%d\n", ret);
		for (int j : d[i]) {
			for (int k : rc[j]) {
				if (c[k] >= 1) ret--;
				c[k] -= r[k] / i - r[k] / (i + 1);
				if (c[k] >= 1) ret++;
			}
			for (int k : lc[j]) {
				if (c[k] >= 1) ret--;
				c[k] += l[k] / i - l[k] / (i + 1);
				if (c[k] >= 1) ret++;
			}
		}
	}
	return 0;
}