#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;

const int N = 300010;

int n, m, d[N];
struct Point {int l, r;} a[N];

bool operator < (Point a, Point b) {
	return a.r - a.l < b.r - b.l;
}

namespace BIT {
#define lowbit(i) (i & -i)
int c[N];
void add(int x, int v) {
	for(int i = x; i <= m; i += lowbit(i)) c[i] += v;
}
int query(int x) {
	int ans = 0;
	for(int i = x; i; i -= lowbit(i)) ans += c[i];
	return ans;
}
}

int main() {
	scanf("%d%d", &n, &m);
	for(int i = 1; i <= n; ++i) scanf("%d%d", &a[i].l, &a[i].r);
	sort(a + 1, a + n + 1);
	int cur = 1;
	for(int i = 1; i <= m; ++i) {
		while(cur <= n && a[cur].r - a[cur].l + 1 <= i) {
			BIT::add(a[cur].l, 1); BIT::add(a[cur].r + 1, -1);
			++cur;
		}
		for(int j = i; j <= m; j += i) d[i] += BIT::query(j);
		d[i] += n - cur + 1;
	}
	for(int i = 1; i <= m; ++i) printf("%d\n", d[i]);
	return 0;
} 