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

class FenwickTree {
private:
    long long n;
    vector<long long> dat;
public:
    FenwickTree(long long _n): n(_n), dat(_n+1, 0) {}
    FenwickTree(long long _n, long long init): n(_n), dat(_n+1, 0) {
        for (long long i = 0; i <= _n; i++) {
            add(i, init);
        }
    }
    
    void add(long long idx, long long value) {
        idx++;
        while(idx <= n) {
            dat[idx] += value;
            idx += idx & -idx;
        }
    }

    long long query(long long l, long long r) {
        long long ans = 0;
        r++;
        while(r > 0) {
            ans += dat[r];
            r -= r & -r;
        }
        while(l > 0) {
            ans -= dat[l];
            l -= l & -l;
        }
        return ans;
    }
};

bool comp(pair<long long,long long> a, pair<long long,long long> b)
{
    if (a.second - a.first <= b.second - b.first)
        return true;
    else
        return false;
}

long long main(void)
{
    long long n, m;
    cin >> n >> m;

    vector< pair<long long,long long> > A(n);
    for (long long i = 0; i < n; i++) {
        cin >> A[i].first >> A[i].second;
    }
    sort(A.begin(), A.end(), comp);

    FenwickTree ft(m+2);

    long long idx = 0;
    for (long long d = 1; d < m+1; d++) {
        long long count = 0;
        for(; idx < n && A[idx].second - A[idx].first < d; idx++) {
            ft.add(A[idx].first, 1);
            ft.add(A[idx].second+1, -1);
        }
        for (long long i = 0; i < m+1; i += d) {
            count += ft.query(0, i);
        }
        count += n - idx;
        cout << count << endl;
    }
}
