#include <algorithm>
#include <cstdio>
struct data
{
	int l, r, len; 
	inline void input()
	{
		scanf("%d%d", &l, &r);
		len = r - l + 1; 
	}
	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++)
		arr[i].input(); 
	std::sort(arr, arr + n); 
	for (int i = 1, idx = 0; i <= m; i++)
	{
		while (idx < n && arr[idx].len <= i)
		{
			modify(arr[idx].l, 1); 
			modify(arr[idx++].r + 1, -1); 
		}
		int ans = n - idx; 
		for (int j = i; j <= m; j += i)
			ans += query(j); 
		printf("%d\n", ans);
	}
	return 0; 
}
