#include<bits/stdc++.h>

using namespace std;

typedef long long LL;

struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star;
#define fin "\n"


#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)

template <typename T>
inline void chmin(T &l,T r){l=min(l,r);}

template <typename T>
inline void chmax(T &l,T r){l=max(l,r);}

template <typename T>
istream& operator>>(istream &is,vector<T> &v){
    for(auto &it:v)is>>it;
    return is;
}
#include <bits/stdc++.h>
using namespace std;

#define SIZE 1000000
#define L(v) (v*2+1)
#define R(v) (v*2+2)

typedef int val;
struct node {
    int bg, ed, A;
    int add;
    val v;
    void addinit() { add = A = 0; }
    int len() { return ed - bg + 1; };
    inline val getval() {
        return v+add;
    }
    inline void init(int b, int e) {
        bg = b, ed = e;
        addinit();
        v=0;
    }
    bool isleaf() { return bg == ed; }
}mem[SIZE];

inline val C(val l, val r) {
    return l+r;
}
class segT {
private:
    node *t;

public:
    segT(int bg, int ed) :t(mem) { make_tree(bg, ed); }
    inline void lazy_update(int v) {
        node *p = t + v, *l = t + L(v), *r = t + R(v);
        if (p->isleaf())return;
        int &pa=p->add;
        if (p->A) {
            l->add += pa;
            r->add += pa;
            l->A = r->A = 1;
        }
        p->addinit();
    }
    void update(int v) {
        node *p = t + v, *l = t + L(v), *r = t + R(v);
        if (p->isleaf()){
            p->v += p->add;
            p->add=0;
        }
        else
            p->v = C(l->getval(), r->getval());
    }
#define ADD 1
#define GET 2
    val F(int type, int bg,int ed,int value,int v=0){
        node *p = t + v, *l = t + L(v), *r = t + R(v);
        lazy_update(v);
        val res=0;
        if (bg == p->bg&&ed == p->ed) {
            if(type==GET){
                update(v);
                return p->getval();
            }
            if(type==ADD){
                p->add += value;
                p->A = 1;
            }
            lazy_update(v);
            update(v);
            return res;
        }
        int m;
        if (bg <= (m = min(ed, l->ed)))
            res=C(res,F(type,bg, m,value, L(v)));
        if ((m = max(bg, r->bg)) <= ed)
            res=C(res,F(type,m, ed, value,R(v)));
        update(v);
        return res;
    }
    void add(int bg, int ed, int value) {
        F(ADD,bg,ed,value);
    }
    val get(int bg, int ed) {
        return F(GET,bg,ed,0);
    }
    void make_tree(int bg, int ed,int v=0) {
        node *p = t + v;
        p->init(bg, ed);
        if (!p->isleaf()) {
            int m = (bg + ed) / 2;
            make_tree(bg, m, L(v));
            make_tree(m+1, ed, R(v));
        }
    }
};
typedef pair<int,int> P;
#define Lv first
#define Rv second
#define RG(p) (p.Rv-p.Lv+1)
int main(){
    int N,M;
    cin>>N>>M;
    segT st(0,M+114514);
    vector<P> lr(N);
    REP(i,N){
        cin>>lr[i].Lv>>lr[i].Rv;
    }
    sort(lr.begin(),lr.end(),[&](P l,P r){return RG(l)<RG(r);});
    int id=0;
    FOR(i,1,M+1){
        //cout<<i<<":"<<endl;
        while(id<N&&RG(lr[id])<i){
            st.add(lr[id].Lv,lr[id].Rv,1);
            //cout<<"add:"<<lr[id].Lv<<" "<<lr[id].Rv<<endl;

            id++;
        }
        int res =N-id;
        for(int j=0;j<=M;j+=i)
            res+=st.get(j,j);
        cout<<res<<fin;
    }
    
}


Measured memory_bytes: 13568