/*
Hanit Banga
*/

#include <iostream>
#include <vector>
#include <ext/pb_ds/assoc_container.hpp> // Common file
#include <ext/pb_ds/tree_policy.hpp> // Including tree_order_statistics_node_update

using namespace std;
using namespace __gnu_pbds;

#define pb push_back
#define fast_cin() ios_base::sync_with_stdio(false)

typedef long long ll;
typedef pair <int, int> pii;
typedef pair <ll, ll> pll;
template <typename has_less>
using ordered_set =
tree <has_less,
null_type,
less <has_less>,
rb_tree_tag,
tree_order_statistics_node_update
>;

const int N = 3e5 + 5, M = 1e5 + 5, INF = 1e7;

int ans[M] = {0};
pii s[N];
vector <pii> events;
vector <int> trains[M];
ordered_set <pii> current;

int main()
{
	int n, m;
	cin >> n >> m;	

	for (int i = 1; i <= n; ++i)
	{
		cin >> s[i].first >> s[i].second;
		events.pb({s[i].first, i});
		events.pb({s[i].second + 1, -i});
	}

	sort(events.begin(), events.end());
	for (int i = 1; i <= m; ++i)
		for (int j = i; j <= m; j += i)
			trains[j].pb(i);

	for (int i = 1; i <= m; ++i)
	{
		while (!events.empty())
		{
			auto cur = *(events.begin());
			if (cur.first > i)
				break;

			if (cur.second > 0)
				current.insert({cur.first, cur.second});

			else
				current.erase({s[-cur.second].first, -cur.second});

			events.erase(events.begin());
		}

		for (auto &j : trains[i])
		{
			int temp = current.order_of_key({i - j, INF});
			ans[j] += current.size() - temp;
		}
	}

	for (int i = 1; i <= m; ++i)
		cout << ans[i] << '\n';
}