#pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
using ll = long long;
using ull = unsigned long long; 
using pii =  pair<int, int>;
using pll =  pair<long long, long long>;
#define rep(i, n) for(int i = 0; i < (n); ++i)
#define all(x) (x).begin(),(x).end()
constexpr char ln =  '\n';
constexpr long long MOD = 1000000007LL;
//constexpr long long MOD = 998244353LL;
template<class T, class U> inline bool chmax(T &a, U b) { if (a < b) { a = b; return true;} return false; }
template<class T, class U> inline bool chmin(T &a, U b) { if (a > b) { a = b; return true;} return false; }
////////////////////////////////////////////////////////////////////////////////////////////////////////////

template<typename T, typename U, typename F, typename G, typename H>
struct LazySegmentTree {
    T unitynode;
    U unitylazy;
    F f;
    G g;
    H h;
    int N;
    int height;
    vector<T> node;
    vector<U> lazy;

    LazySegmentTree(F f, G g, H h, T unitynode, U unitylazy) : f(f), g(g), h(h), unitynode(unitynode), unitylazy(unitylazy) {}

    void init(int sz) {
        N = 1;
        height = 0;
        while (N < sz) {
            N *= 2;
            ++height;
        }
        node.assign(2*N,unitynode);
        lazy.assign(2*N,unitylazy);
    }

    void set(int k, const T &val) {node[k+N] = val;}

    void build() {
        for (int i = N-1; i > 0; --i) {
            node[i] = f(node[i<<1|0],node[i<<1|1]);
        }
    }

    inline T reflect(int k) {
        return lazy[k] == unitylazy ? node[k] : g(node[k],lazy[k]);
    }

    void eval(int k) {
        if (lazy[k] == unitylazy) return;
        if (k < N) {
            lazy[k<<1|0] = h(lazy[k<<1|0],lazy[k]);
            lazy[k<<1|1] = h(lazy[k<<1|1],lazy[k]);
        }
        node[k] = reflect(k);
        lazy[k] = unitylazy;
    }

    inline void recalc(int k) {
        while (k >>= 1) {
            node[k] = f(reflect(k<<1|0),reflect(k<<1|1));
        }
    }

    // [l,r) (0-indexed)
    void update(int l, int r, U val) {
        if (l >= r) return;
        l += N; r += N-1;
        for (int i = height; i > 0; --i) {
            eval(l>>i);
            eval(r>>i);
        }
        int a = l; int b = r++;
        while (l < r) {
            if (l & 1) lazy[l] = h(lazy[l],val), ++l;
            if (r & 1) --r, lazy[r] = h(lazy[r],val);
            l >>= 1; r >>= 1;
        }
        recalc(a);
        recalc(b);
    }

    T get(int l, int r) {
        if (l >= r) return unitynode;
        l += N; r += N-1;
        for (int i = height; i > 0; --i) {
            eval(l>>i);
            eval(r>>i);
        }
        ++r;
        T vl = unitynode, vr = unitynode;
        while (l < r) {
            if (l & 1) vl = f(vl,reflect(l++));
            if (r & 1) vr = f(reflect(--r),vr);
            l >>= 1; r >>= 1;
        }
        return f(vl,vr);
    }

    T operator[](int x) {return reflect(x+N);}
};

using Tu = tuple<int, int, int>; 
int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    int N,M; cin >> N >> M;
    vector<Tu> A(N);
    rep(i,N) {
        int l; int r; cin >> l >> r;
        r++;
        A[i] = Tu(r-l,l,r);
    }

    auto f=[](int a, int b) {return max(a,b);};
    auto g=[](int a, int val) {return a+val;};
    const int id = 0;
    LazySegmentTree<int, int, decltype(f), decltype(g), decltype(g)> seg(f,g,g,id,id);
    seg.init(M+1);
    seg.build();

    sort(all(A));
    int cur = 0;
    for (int i = 1; i <= M; i++) {
        while (cur < N and get<0>(A[cur]) < i) {
            int w,l,r;
            tie(w,l,r) = A[cur];
            seg.update(l,r,1);
            cur++;
        }
        int ans = N-cur;
        for (int j = 0; j*i <= M; j++) {
            ans += seg.get(j*i,j*i+1);
        }
        cout << ans << ln;
    }
}


Measured memory_bytes: 6528