#include <algorithm>
#include <cstdio>
struct data
{
	int l, r, len; 
	inline bool operator <(const data &a) const
	{
		return len < a.len; 
	}
} arr[300005]; 
int sum[100005], n, m; 
inline void modify(int pos, int x)
{
	for (; pos <= m; pos += pos & -pos)
		sum[pos] += x; 
}
inline int query(int pos)
{
	int res = 0; 
	for (; pos; pos -= pos & -pos)
		res += sum[pos]; 
	return res; 
}
int main()
{
	// freopen("ARC068-E.in", "r", stdin); 
	scanf("%d%d", &n, &m); 
	for (int i = 0; i < n; i++)
	{
		scanf("%d%d", &arr[i].l, &arr[i].r); 
		arr[i].len = arr[i].r - arr[i].l + 1; 
	}
	std::sort(arr, arr + n); 
	for (int i = 1, cur = 0; i <= m; i++)
	{
		while (cur < n && arr[cur].len <= i)
		{
			modify(arr[cur].l, 1); 
			modify(arr[cur].r + 1, -1); 
			cur++; 
		}
		int ans = 0; 
		for (int j = i; j <= m; j += i)
			ans += query(j);
		printf("%d\n", ans + n - cur);
	}
	return 0; 
}
