#include<bits/stdc++.h>
using namespace std;
#define ll long long
#define f(i, x, n) for(int i = x; i < (int)n; ++i)

int f[100001], n, m;
pair<int, pair<int, int> > p[300000];

inline void ad(int i, int x) { while (i <= m)f[i] += x, i += i & -i; }
inline int gt(int i) { int an = 0; while (i)an += f[i], i ^= i & -i; return an; }

int main(){
	scanf("%d%d", &n, &m);
	f(i, 0, n){
		int a, b;
		scanf("%d%d", &a, &b);
		p[i] = make_pair(b - a + 1, make_pair(a, b));
	}
	sort(p, p + n);
	int j = 0;
	f(i, 1, m + 1){
		while (j < n && p[j].first < i){
			ad(p[j].second.first, 1);
			ad(p[j].second.second + 1, -1);
			++j;
		}
		int an = n - j;
		for (int j = i; j <= m; j += i)an += gt(j);
		printf("%d\n", an);
	}
}
