#include <bits/stdc++.h>
using namespace std;
int main() {
	int N, M;
	cin >> N >> M;
	vector<int> L(N), R(N);
	for (int i = 0; i < N; ++ i) cin >> L[i] >> R[i];

	vector<int> a(M+3);
	for (int i = 0; i < N; ++ i) {
		int n = 1;
		for (;;) {
			int x = (L[i]+n-1)/n;
			int y = R[i]/n;
			if (y < 2) break;
			if (x > y) {
				n = max(n+1, L[i]/y);
				continue;
			}

			int m = n;
			while (x > 2) {
				int m2 = R[i] / (x-1);
				if (m2 <= m) break;
				m = m2;
				x = (L[i] + m - 1) / m;
			}
			x = max(2, x);
			//cout << "n = " << n << endl;
			//cout << "m = " << m << endl;
			//cout << "[" << x << ", " << y << "]" << endl;
			a[x]++;
			a[y+1]--;
			
			if (x == 2) break;
			n = R[i]/x + 1;
		}
		//cout << endl;
	}

	cout << N << endl;
	int x = 0;
	for (int d = 2; d <= M; ++ d) {
		x += a[d];
		cout << x << endl;
	}
}
