#include <bits/stdc++.h>
using namespace std;

const int maxn = 100005;

inline int gi()
{
	char c = getchar();
	while (c < '0' || c > '9') c = getchar();
	int sum = 0;
	while ('0' <= c && c <= '9') sum = sum * 10 + c - 48, c = getchar();
	return sum;
}

int n, m, sum[maxn];

struct node
{
	int Id, x, y1, y2;

	bool operator < (const node &a) const {
		return x != a.x ? x < a.x : !Id;
	}
} s[maxn * 65];
int cnt;

int Sum[maxn];

void insert(int x, int a)
{
	++x;
	while (x <= m + 1) {
		Sum[x] += a;
		x += x & (-x);
	}
}

int query(int x)
{
	int res = 0; ++x;
	while (x) {
		res += Sum[x];
		x -= x & (-x);
	}
	return res;
}

int main()
{
	n = gi(); m = gi();
	for (int i = 1; i <= n; ++i) s[++cnt] = (node) {0, gi(), 0, gi()};
	for (int i = 2, j; i <= m; ++i) {
		for (j = i; j <= m; j += i)
			s[++cnt] = (node) {-i, j - i, j - i + 1, j - 1}, s[++cnt] = (node) {i, j - 1, j - i + 1, j - 1};
		j -= i; if (j + 1 <= m) s[++cnt] = (node) {-i, j, j + 1, m}, s[++cnt] = (node) {i, n, j + 1, m};
	}
	
	sort(s + 1, s + cnt + 1);
	for (int i = 1; i <= cnt; ++i)
		if (!s[i].Id) insert(s[i].y2, 1);
		else {
			if (s[i].Id < 0) sum[-s[i].Id] -= query(s[i].y2) - query(s[i].y1 - 1);
			else sum[s[i].Id] += query(s[i].y2) - query(s[i].y1 - 1);
		}
	for (int i = 1; i <= m; ++i) printf("%d\n", n - sum[i]);

	
	return 0;
}

