// Slower C++ solution:
//### In The Name Of GOD ###



//%% Remember; (((He))) is The (((Accepter))) %%



// GOD IS GREATER ...



#include <bits/stdc++.h>



using namespace std;



typedef long long ll ;

typedef long double ld ;



#define int ll

#define pb push_back

#define bp pop_back

#define pf push_front

#define fp pop_front

#define X first

#define Y second

#define IO ios_base::sync_with_stdio(false);

#define sz(a) (int)(a.size())

#define sg(a, b) (a + b - 1) / b



const int MOD = 1000 * 1000 * 1000 + 7;

const int INF = 8 * 1000 * 1000 + 200;

const int MAXN =  100 * 1000 + 10;

const int MLOG = 18;

const int NMAX = 20;



struct fen{

	int fn[MAXN];

	

	void add(int idx, int val){

		for (idx++; idx < MAXN; idx += idx & -idx)

			fn[idx] += val;

	}



	void addr(int l, int r, int val = 1){

		add(l, val);

		add(r + 1, -val);

	}



	int ansq(int idx){

		int ans = 0;

		for (idx++; idx > 0; idx -= idx & -idx)

			ans += fn[idx];

		return ans;

	}

}me;



signed main(){

	IO;

	int n, m;

	cin >> n >> m;

	int seg[n][2];

	vector<pair<int, int>> vc[3 * MAXN];

	for(int i = 0; i < n; i++){

   		cin >> seg[i][0] >> seg[i][1];

		vc[seg[i][1] - seg[i][0] + 1].pb({seg[i][0], seg[i][1]});

	}

	int x = 0;

	for(int i = 1; i <= m; i++){

		int ans = 0;

		for(int j = 0; j < sz(vc[i]); j++){

			me.addr(vc[i][j].X, vc[i][j].Y);

			x++;

		}

		for(int j = i; j <= m; j += i){

			ans += me.ansq(j);

		}

		cout << ans + n - x << endl;

	}

}

// Faster C++ solution for the same problem (measured speedup: 9.311450752721774x):
#include <bits/stdc++.h>



using namespace std;



#define endl "\n"

#define fi first

#define se second

#define pb push_back

#define all(x) (x).begin(), (x).end()

#define rall(x) (x).rbegin(), (x).rend()

#define fastio { ios_base::sync_with_stdio(false), cin.tie(NULL); }

#define forn(i, n) for(int i = 0; i < (int)(n); i++)

#define for1(i, n) for(int i = 1; i <= (int)(n); i++)

#define fore(i, a, b) for (int i = (int)(a); i <= (int)(b); i++)

#define ford(i, n) for (int i = (int)(n) - 1; i >= 0; --i)



#ifdef RICARDO

//Header here

	#include "E:\\Code\\dbg.h"

#else

	#define bug(...) "RICARDO MILOS"

#endif





template<class T> bool mini(T &a, T b) { return a > b ? (a = b, true) : false; }

template<class T> bool maxi(T &a, T b) { return a < b ? (a = b, true) : false; }



typedef pair<int, int> pii;

typedef vector<int> vi;

typedef vector<pii> vpi;

typedef vector<vi> vvi;

typedef long long i64;

typedef vector<i64> vi64;

typedef vector<vi64> vvi64;

typedef pair<i64, i64> pi64;

typedef double ld;



//=================================================CODE=================================================//



signed main()

{	

	fastio;

	cout.precision(10);

	cout << fixed;

#ifdef RICARDO		

	freopen("i", "r", stdin);

#endif

	int n, m; cin >> m >> n;

	vpi prs(m);

	for(auto &e : prs) cin >> e.fi >> e.se;

	sort(rall(prs));



	//siege

	vvi D(n + 1);

	for1(i, n) {

		D[0].pb(i);

		for(int j = i; j <= n; j += i) D[j].pb(i);

	}

	//



	vi bit(n + 1, 0);

	auto up = [&](int i) {

		for(; i <= n; i += i & -i) bit[i]++;

	};

	auto get = [&](int i) {

		int RES = 0;

		for(; i; i -= i & -i) RES += bit[i];

		return RES;

	};



	vi ANS(n + 1, m);

	int cur = 0;

	ford(i, n) {

		while(cur < m && prs[cur].fi > i) {

			up(prs[cur].se);			

			cur++;			

		}



		for(int v : D[i]) {

			int j = i + v;

			ANS[v] -= get(min(j - 1, n));						

		}	

	}



	for1(i, n) cout << ANS[i] << endl;

#ifdef RICARDO

	cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";

#endif

}