///#pragma GCC optimize("Ofast,unroll-loops,no-stack-protector,fast-math")
///#pragma GCC target("sse,sse2,sse3,ssse3,sse4,abm,mmx,popcnt,avx,avx2,tune=native")

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <ext/rope>

/*
    zet:
        find_by_order(k): k-stat [k > 0]
        order_of_key(k) : {el < k}

    gp_hash_table<key, val, custom_hash>

    rope<T>:
        iterators: mutable_begin, ..
        methods  : erase, insert, substr, ..
*/

#define all(x) (x).begin(), (x).end()
#define size(x) (int)((x).size())
#define em_back emplace_back

using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;

using ll = long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;

template<typename T>
using zet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};

mt19937 eng(chrono::steady_clock::now().time_since_epoch().count());

const int N = 3e5 + 4;
const int M = 1e5 + 4;

struct Node {
    int l, r;
    int sum;

    Node* lc;
    Node* rc;

    Node(int l_, int r_) : l(l_), r(r_) {
        sum = 0;
        if (l == r) {
            lc = rc = nullptr;
            return;
        }
        int m = (l + r) >> 1;
        lc = new Node(l, m);
        rc = new Node(m + 1, r);
    }

    void modify(int pos) {
        if (l == r) {
            sum++;
            return;
        }
        int m = (l + r) >> 1;
        if (pos <= m) {
            lc->modify(pos);
        } else {
            rc->modify(pos);
        }
        sum = lc->sum + rc->sum;
    }

    int compute(int l_, int r_) {
        if (l == l_ && r == r_) {
            return sum;
        }
        int m = (l + r) >> 1;
        if (r_ <= m) {
            return lc->compute(l_, r_);
        } else if (l_ > m) {
            return rc->compute(l_, r_);
        } else {
            return lc->compute(l_, m) + rc->compute(m + 1, r_);
        }
    }
};

int n, m, ans[M];
vector<int> line[M];
vector<pii> arr[M];

void solve() {
    cin >> n >> m;
    for (int i = 0; i < n; ++i) {
        int l, r;
        cin >> l >> r;
        line[r].em_back(l);
    }

    for (int i = 1; i <= m; ++i) {
        for (int j = 1; j * i <= m; ++j) {
            arr[j * i].em_back(pii(i, j));
        }
    }

    Node* root = new Node(1, m);
    for (int r = m; r > 0; --r) {
        for (int l : line[r]) {
            root->modify(l);
        }
        for (pii p : arr[r]) {
            int d = p.first;
            int i = p.second;
            ans[d] += root->compute(max(1, r - d + 1), r);
        }
    }

    for (int i = 1; i <= m; ++i) {
        cout << ans[i] << "\n";
    }
}

int main() {
    ios::sync_with_stdio(0);
    cout.tie(0), cin.tie(0);

    int z = 1;
    /// cin >> z;

    while (z--) {
        solve();
    }

    return 0;
}


Measured memory_bytes: 34420