#include <stdio.h>
#include <string.h>
#include <iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<unordered_map>
#include<unordered_set>
#define P pair<int,int>
using namespace std;

int BIT[100005];
void add(int a) {
	while (a < 100005) {
		BIT[a]++;
		a += a&-a;
	}
}
void take(int a) {
	while (a < 100005) {
		BIT[a]--;
		a += a&-a;
	}
}
int sum(int a) {
	int b = 0;
	while (a > 0) {
		b += BIT[a];
		a -= a&-a;
	}
	return b;
}
P c[300000];
signed main() {
	int a, b; cin >> a >> b;
	for (int d = 0; d < a; d++) {
		int e, f; scanf("%d%d", &e, &f);
		c[d] = { f - e,e };
	}
	sort(c, c + a);
	int ans = a;
	int K = 0;
	for (int i = 1; i <= b; i++) {
		while (K<a&&c[K].first + 1 < i) {
			ans--;
			add(c[K].second); take(c[K].second + c[K].first + 1);
			K++;
		}
		int N = 0;
		for (int j = i; j <= b; j += i) {
			N += sum(j);
		}
		printf("%d\n", ans + N);
	}
}