#include<bits/stdc++.h>
#define rep(i,n)for(int i=0;i<(n);i++)
using namespace std;
typedef pair<int, int>P;

int n, m;
int bit[100001];
P v[300000];

void add(int k, int x) {
	while (k <= m) {
		bit[k] += x;
		k += k &-k;
	}
}
int sum(int k) {
	int res = 0;
	while (k > 0) {
		res += bit[k];
		k -= k&-k;
	}
	return res;
}
int main() {
	scanf("%d%d", &n, &m);
	rep(i, n) {
		int l, r; scanf("%d%d", &l, &r);
		v[i] = P(r - l + 1, l);
	}
	sort(v, v + n);
	int s = 0;
	for (int i = 1; i <= m; i++) {
		while (s < n && v[s].first < i) {
			add(v[s].second, 1); add(v[s].second + v[s].first, -1);
			s++;
		}
		int ans = n - s;
		for (int j = 0; j <= m; j += i)ans += sum(j);
		printf("%d\n", ans);
	}
}