#include<bits/stdc++.h>

int main() {
    using namespace std;
    unsigned long N, M;
    cin >> N >> M;
    vector<pair<unsigned long, unsigned long>> souv(N);
    for(auto& i : souv){
        cin >> i.first >> i.second;
        --i.first;
    }
    vector<unsigned long> ans(M + 1), raw(M + 1);
    unsigned long lim{0};
    const auto& add = [&ans, &lim](unsigned long i, bool f) -> void { if(i >= lim)ans[i] += f ? -1 : 1; };
    const auto& add_raw = [&raw, &lim](unsigned long i, unsigned long x) -> void { if(i >= lim)raw[i] += x; };
    for(const auto& i : souv){
        lim = i.second - i.first + 1;
        ans[lim - 1] += (i.second / lim == i.first / lim );
        for(unsigned long j{1}; j * j <= M; ++j){
            add(i.first / j, true);
            add(i.second / j, false);
        }
        for(unsigned long j{1}; j * j <= M; ++j){
            if(j * j < i.first)add_raw(j, -i.first / j);
            if(j * j < i.second)add_raw(j, i.second / j);
        }
    }
    partial_sum(ans.rbegin(), ans.rend(), ans.rbegin());
    transform(ans.begin() + 1, ans.end(), raw.begin(), ostream_iterator<unsigned long>(cout, "\n"), plus<>());
    return 0;
}