#include <iostream>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <cstring>
#include <chrono>
#include <vector>
#include <map>
#include <random>
#include <set>
#include <algorithm>
#include <math.h>
#include <cstdio>
#include <stdio.h>
#include <queue>
#include <bitset>
#include <cstdlib>
#include <deque>
#include <cassert>
#include <stack>
using namespace std;

#define mp make_pair
#define f first
#define se second
#define pb push_back
#define ppb pop_back
#define ll long long
#define ull unsigned long long
#define cntbit(x) __builtin_popcount(x)
#define endl '\n'
#define uset unordered_set
#define umap unordered_map
#define all(x) x.begin(), x.end()
#define pii pair<int, int>
#define ld long double
#define pll pair<long long, long long>

mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());

inline void setin(string s) {
	freopen(s.c_str(), "r", stdin);
}

inline void setout(string s) {
	freopen(s.c_str(), "w", stdout);
}

template <typename T> inline T range(T l, T r) {
	return uniform_int_distribution <T>(l, r)(rng);
}
 
template <typename T> void Min(T &a, T b) {
    a = min(a, b);
}
 
template <typename T> void Max(T &a, T b) {
    a = max(a, b);
}

template <typename T> ostream &operator << (ostream &cout, vector <T> x) {
	for(auto it = x.begin(); it != x.end(); ++it) {
		if(it == x.begin())
			cout << "{" << *it;
		else
			cout << ", " << *it;
	}
	cout << "}";
	return cout;
}

template <typename T> ostream &operator << (ostream &cout, set <T> x) {
	for(auto it = x.begin(); it != x.end(); ++it) {
		if(it == x.begin())
			cout << "{" << *it;
		else
			cout << ", " << *it;
	}
	cout << "}";
	return cout;
}

const int inf = 0x3f3f3f3f;
const int mod = 998244353;
const int N = 3e5 + 15;
int n, m;
pii a[N];

struct node {
	node *l, *r;
	int val;
	node(node *_l, node *_r) {
		l = _l, r = _r;
		val = (l ? l->val : 0) + (r ? r->val : 0);
	}
	node(int val) : val(val) {
		l = r = NULL;
	}
};

typedef node* pnode;

vector <pnode> root = {NULL};

pnode update(pnode t, int tl, int tr, int pos, int val) {
	if(tl == tr)
		return new node((t ? t->val : 0) + val);
	int mid = tl + tr >> 1;
	if(pos <= mid)
		return new node(update((t ? t->l : NULL), tl, mid, pos, val), (t ? t->r : NULL));
	return new node((t ? t->l : NULL), update((t ? t->r : NULL), mid + 1, tr, pos, val));
}

void update_no_new(pnode &t, int tl, int tr, int pos, int val) {
	if(!t)
		t = new node(0);
	if(tl == tr) {
		t->val += val;
		return;
	}
	int mid = tl + tr >> 1;
	if(pos <= mid)
		update_no_new(t->l, tl, mid, pos, val);
	else
		update_no_new(t->r, mid + 1, tr, pos, val);
	t->val = (t->l ? t->l->val : 0) + (t->r ? t->r->val : 0);
}

int get(pnode t, int tl, int tr, int l, int r) {
	if(tl > r || tr < l || !t)
		return 0;
	if(tl >= l && tr <= r)
		return t->val;
	int mid = tl + tr >> 1;
	return get(t->l, tl, mid, l, r) + get(t->r, mid + 1, tr, l, r);
}

vector <int> is;

inline int get(int i, int x) {
	int ind = upper_bound(is.begin(), is.end(), i) - is.begin() - 1;
	return get(root[ind], 1, m, x, m);
}

main() {
	ios_base::sync_with_stdio(0); cout.tie(0); cin.tie(0);
	// setin("input.txt");
	cin >> n >> m;
	for(int i = 1; i <= n; ++i)
		cin >> a[i].f >> a[i].se;
	sort(a + 1, a + 1 + n);
	is.pb(-1);
	for(int i = 1; i <= n; ++i) {
		// if(is.back() == a[i].f)
		// 	update_no_new(root.back(), 1, m, a[i].se, 1);
		// else {
			root.pb(update(root.back(), 1, m, a[i].se, 1));
			is.pb(a[i].f);
		// }
	}
	for(int i = 1; i <= m; ++i) {
		int ans = 0;
		for(int j = i; j <= m; j += i)
			ans += get(j, j) - get(j - i, j);
		cout << ans << endl;
	}
	return 0;
}

Measured memory_bytes: 175340