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

#define FORE(i, a) for (auto i = a.begin(); i != a.end(); ++i)
#define REPU(i, a, b) for (int i = (a); i < (b); ++i)
#define REPD(i, a, b) for (int i = (a); i > (b); --i)
#define MEM(a, x) memset(a, x, sizeof(a))
#define ALL(a) a.begin(), a.end()
#define UNIQUE(a) a.erase(unique(ALL(a)), a.end())

vector<string> split(const string &s, char c) {
	vector<string> v; stringstream ss(s); string x;
	while (getline(ss, x, c)) v.push_back(x);
	return v;
}
#define DEBUG(args...) { vector<string> _v = split(#args, ','); err(_v.begin(), args); }
void err(vector<string>::iterator it) {}
template<typename T, typename... Args>
void err(vector<string>::iterator it, T a, Args... args) {
	cerr << "[DEBUG] " << it -> substr((*it)[0] == ' ', it -> length()) << " = " << a << '\n';
	err(++it, args...);
}

typedef long long ll;
const int MOD = 1000000007;

template<class T, class U> inline T tmin(T a, U b) { return (a < b) ? a : b; }
template<class T, class U> inline T tmax(T a, U b) { return (a > b) ? a : b; }
template<class T, class U> inline void amax(T &a, U b) { if (b > a) a = b; }
template<class T, class U> inline void amin(T &a, U b) { if (b < a) a = b; }
template<class T> T gcd(T a, T b) { while (b != 0) { T c = a; a = b; b = c % b; } return a; }

const int N = 300005, M = 100005;
int l[N], r[N], dp[M], ans[M];

struct node {
    int sum, lazy;
};

struct SegmentTree {
    vector<node> seg;

    SegmentTree(int _n) {
        int tn = 1;
        while (tn <= _n) tn = tn << 1;
        seg.resize(tn << 1);
    }

    inline void lazy_evaluate(int ind, int len) {
        seg[ind].sum += seg[ind].lazy;
        if (len > 1) {
            int c1 = ind << 1, c2 = c1 | 1;
            seg[c1].lazy += seg[ind].lazy;
            seg[c2].lazy += seg[ind].lazy;
        }
        seg[ind].lazy = 0;
    }

    inline void update_node(int ind) {
        seg[ind].sum = seg[ind << 1].sum + seg[ind << 1 | 1].sum;
    }

    void build_tree(int ind, int s, int e) {
        if (e - s == 1) {
			seg[ind].sum = dp[s];
            seg[ind].lazy = 0;
            return;
        }
        int c1 = ind << 1, c2 = c1 | 1, m = (s + e) >> 1;
        build_tree(c1, s, m);
        build_tree(c2, m, e);
        update_node(ind);
    }

    /* interval [s, e) */
    void update(int ind, int s, int e, int ss, int ee, int val) {
        lazy_evaluate(ind, e - s);
        if (s >= ee || e <= ss) return;
        int c1 = ind << 1, c2 = c1 | 1, m = (s + e) >> 1;
        if (s >= ss && e <= ee) {
            seg[ind].sum += val;
            if (e - s > 1) {
                seg[c1].lazy += val;
                seg[c2].lazy += val;
            }
            return;
        }

        update(c1, s, m, ss, ee, val);
        update(c2, m, e, ss, ee, val);
        update_node(ind);
    }

    /* interval [s, e) */
    int query(int ind, int s, int e, int ss, int ee) {
        lazy_evaluate(ind, e - s);
        if (s >= ee || e <= ss) return 0;
        if (s >= ss && e <= ee) return seg[ind].sum;
        int c1 = ind << 1, c2 = c1 | 1, m = (s + e) >> 1;
        int vl = query(c1, s, m, ss, ee);
        int vr = query(c2, m, e, ss, ee);
        return (vl + vr);
    }
};

int main(int argc, char *argv[]) {
	ios_base::sync_with_stdio(false);
	MEM(dp, 0); MEM(ans, 0);

	int n, m; cin >> n >> m;
	typedef pair<int, int> P;
	vector<P> seg(n);
	REPU(i, 0, n) {
		cin >> l[i] >> r[i];
		int x = r[i] - l[i] + 1;
		dp[l[i]]++, dp[r[i] + 1]--;
		seg[i].first = x;
		seg[i].second = i;
	}
	sort(ALL(seg));
	REPU(i, 1, M) {
		dp[i] += dp[i - 1];
	} 
	int nm = m + 1;
	SegmentTree st(nm);
	st.build_tree(1, 0, nm);
	int pos = n - 1;
	REPD(i, m, 0) {
		while (pos >= 0) {
			if (seg[pos].first != i) break;
			// update
			int ind = seg[pos].second;
			st.update(1, 0, nm, l[ind], r[ind] + 1, -1);
			pos--;
		}
		ans[i] = n - pos - 1;
		for (int j = i; j <= m; j += i) {
			ans[i] += st.query(1, 0, nm, j, j + 1);
		}
	}
	REPU(i, 1, m + 1) printf("%d\n", ans[i]);

	return 0;
}


Measured memory_bytes: 8448