#include <bits/stdc++.h>
using namespace std;

//MACROS
#define pb push_back
#define rep(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
typedef long long LL;
typedef pair <int,int> PII;


int t[1<<20], n, m, cur;
vector <PII> v[1<<20];

void update(int idx, int val) { for (;idx <= m; idx += (idx & -idx)) t[idx] += val; }
int get(int idx) {
    int res = 0;
    for (;idx; idx -= (idx & -idx)) res += t[idx];
    return res;
}


int main() {
	cin >> n >> m;
	rep(i,0,n) {
        int x, y;
        cin >> x >> y;
        v[y-x+1].pb({x,y});
	}

	rep(i,1,m+1) {
	    cur += v[i].size();
        for (auto p : v[i]) update(p.first,1), update(p.second+1,-1);
        int ans = n - cur;
        for (int j = i; j <= m; j += i) ans += get(j);
        cout << ans << "\n";
	}
}
