#include <bits/stdc++.h>
using namespace std;
//make_tuple emplace_back next_permutation push_back make_pair second first

#if MYDEBUG
#define DBG(...) {string dst__=#__VA_ARGS__;dbgsplit(dst__);stringstream dss__; dss__<<dst__; debug(dss__,__VA_ARGS__);}
#else
#define DBG(...)
#endif
void debug(stringstream& ds){cerr<<endl;return;}
template<typename F, typename... R>void debug(stringstream& ds,const F& f, const R&... r){string n; ds>>n; cerr<< n <<'='<<f<<' '; debug(ds,r...);}
void dbgsplit(string &s){int l=s.length(),n=0;for(int i=0; i<l; ++i){if(s[i]=='(')++n;if(s[i]==')')--n;if(s[i]==','&&!n)s[i]=' ';}}
using LL = long long;
constexpr long long LINF=334ll<<53; constexpr int INF=15<<26; constexpr long long MOD=1E9+7;
//T:取得する値の型　S:変更クエリの型
template<typename T, typename S>
struct LazySegmentTree2{
    static constexpr T id_val=0;
    static constexpr S id_delay=0;
    inline void composite_delay(S &a, S &b){
        a+=b;
    }
    inline void propagate(int k,int h){
        if(!has_delay[k])return ;
        data[k].val+=data[k].delay*(1<<h);
        if(k<n){
            composite_delay(data[2*k].delay, data[k].delay);
            composite_delay(data[2*k+1].delay, data[k].delay);
            has_delay[2*k]=has_delay[2*k+1]=1;
        }
        data[k].delay=id_delay;
        has_delay[k]=0;

    }
    inline T calc(T a,T b){
        return a+b;
    }
    struct Node{
        T val; S delay;
        Node(){val=id_val;delay=id_delay;}
    };
    int n,height;
    vector<Node> data;
    vector<char> has_delay;
    explicit LazySegmentTree2(int size){
        n=1;height=0;
        while(n<size){n<<=1;++height;}
        data=vector<Node>(n<<1,Node());
        has_delay=vector<char>(n<<1,0);
    }
    inline int width(int k){int ret=n;while((k^1)!=0){n>>=1;k>>=1;}return ret;}
    void update(int l, int r, S v){
        l+=n;r+=n;
        int hl=__builtin_ctz(l),hr=__builtin_ctz(r);
        for(int h=height; h>hl; --h)propagate(l>>h,h);
        for(int h=height,rr=r-1; h>hr; --h)propagate(rr>>h,h);
        for(int h=0;l<r; l>>=1, r>>=1,++h){
            if(l&1){
                composite_delay(data[l].delay,v);
                has_delay[l]=1;
                propagate(l,h);
            }
            data[l>>1].val=calc(data[(l>>1)<<1].val,data[((l>>1)<<1)+1].val);
            ++l;
            if(r&1){
                composite_delay(data[r-1].delay,v);
                has_delay[r-1]=1;
                propagate(r-1,h);
            }
            data[(r-1)>>1].val=calc(data[((r-1)>>1)<<1].val,data[(((r-1)>>1)<<1)+1].val);
        }

         for(--l;l>1;l>>=1){data[l>>1].val=calc(data[(l>>1)<<1].val,data[((l>>1)<<1)+1].val);}
    }
    T segget(int l, int r){
        T resl=id_val,resr=id_val;
        l+=n;r+=n;
        int hl=__builtin_ctz(l),hr=__builtin_ctz(r);
        for(int h=height; h>hl; --h)propagate(l>>h,h);
        for(int h=height,rr=r-1; h>hr; --h)propagate(rr>>h,h);
        for(int h=0;l<r; l>>=1, r>>=1,++h){
            if(l&1){
                propagate(l,h);
                resl=calc(resl,data[l++].val);
            }
            if(r&1){
                propagate(r-1,h);
                resr=calc(data[r-1].val,resr);
            }
        }
        return calc(resl,resr);
    }
};

int main(){
    cin.tie(0);
    ios_base::sync_with_stdio(false);
    int n,m;
    cin >> n >> m;
    vector<tuple<int,int,int>> s(n);
    for(int i=0; i<n; ++i){
        int l,r;
        cin >> l >> r;
        s[i]=make_tuple(r-l+1,l,r);
    }
    sort(s.begin(),s.end());

    auto it=s.begin();
    LazySegmentTree2<LL,LL> seg(m+1);
    for(int i=1; i<=m; ++i){
        int ans=0;
        while(get<0>(*it)<i && it<s.end()){
            seg.update(get<1>(*it),get<2>(*it)+1,1);
            it++;
        }
        ans=s.end()-it;
        for(int j=i; j<=m; j+=i){
            ans+=seg.segget(j,j+1);
        }
        cout << ans <<endl;
    }

    return 0;
}



Measured memory_bytes: 8832