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

int d[100005];

int main()
{
	int n, m; scanf("%d%d", &n, &m);
	for (int i = 0;i < n;i++)
	{
		int l, r; scanf("%d%d", &l, &r);
		d[1]++; d[r-l+2]--;
		d[l]++; d[r+1]--;
		if (l <= r-l+1) { d[l]--; d[r-l+2]++; }
		int at = r-l+2;
		while (at < l)
		{
			int fact = (l+at-1)/at;
			int hi = r/fact;
			if (hi >= at)
			{
				d[at]++;
				if (hi+1 < 100005) d[hi+1]--;
			}
			fact = r/(max(at, hi)+1);
			if (fact == 0) break;
			at = (l+fact-1)/fact;
		}
	}
	for (int i = 1;i <= m;i++)
	{
		d[i] += d[i-1];
		printf("%d\n", d[i]);
	}
	return 0;
}
