#include <iostream>
#include <vector>
#include <iomanip>

using namespace std;

class Fenwick {
public:
	Fenwick(int _N) : N(_N), v(N+1, 0) {}
private:
	int N;
	vector<int> v;
public:
	void add(int val, int p){
		for(int i=p;i<=N;i+=i&-i) v[i] += val;
	}
	int sum(int p){
		int res = 0;
		for(int i=p;i>0;i-=i&-i) res += v[i];
		return res;
	}
};

int main(){
	std::ios_base::sync_with_stdio(false);
	int N, M;
	while(cin >> N >> M){
		Fenwick f(M+1);
		vector< vector<pair<int,int>> > range(M+1);
		for(int i=0;i<N;i++){
			int l, r; cin >> l >> r;
			range[r-l+1].push_back(make_pair(l, r));
		}
		cout << N << endl;
		int all = N;
		for(int i=2;i<=M;i++){
			all -= range[i-1].size();
			for(const pair<int,int>& p : range[i-1]){
				f.add(1, p.first);
				f.add(-1, p.second+1);
			}
			int res = all;
			for(int j=i;j<=M;j+=i) res += f.sum(j);
			cout << res << endl;
		}
	}
}
