#include <bits/stdc++.h>
#define mp make_pair
#define mt make_tuple
#define X first
#define Y second
#define ALL(x) x.begin(),x.end()
#define RALL(x) x.rbegin(),x.rend()
#define D double
#define ll long long
#define REP(i,a) for(int i=0;i<a;i++)
#define REP1(i,a,b) for(int i=a;i<b;i++)
#define REP2(i,a,b) for(int i=a;i<=b;i++)
#define RREP(i,a) for(int i=a-1;i>=0;i--)
#define RREP1(i,a,b) for(int i=a;i>b;i--)
#define RREP2(i,a,b) for(int i=a;i>=b;i--)
#define SREP(i,x) for(auto i:x)
#define MS0(x) memset((x),0,sizeof((x)))
#define MS1(x) memset((x),-1,sizeof((x)))
#define MSF(x) memset((x),127,sizeof(x))
#define pb push_back
#define LE(x) (int)((x).size())
#define PII pair<int,int>
#define PLL pair<ll,ll>
#define PDD pair<D,D>
#define im guagua
#define RI(x) x=rit()
#define RII(a,b) a=rit(),b=rit()
#define RIII(a,b,c) a=rit(),b=rit(),c=rit()
#define debug 0
const int INF = 0x7F7F7F7F;
const double EPS = 1e-10 ;
const ll mod7 = 1e9+7;
const ll mod9 = 1e9+9;
using namespace std;
inline ll rit(){
    ll f=0,key=1;
    char c;
    do{
        c=getchar();
        if(c=='-') key=-1;
    }while(c<'0' || c>'9');
    do{
        f=f*10+c-'0';
        c=getchar();
    }while(c>='0' && c<='9');
    return f*key;
}
inline void fprt(D f){
    printf("%.08lf",f);
}
void init(){
}
const int Z = 100005;
int n,m;
int tree[Z*4];
char tag[Z*4];
// inline void modify(int p,int l,int r,int ql,int qr,int cc){
//     // cout<<"modify "<<p<<' '<<l<<' '<<r<<' '<<ql<<' '<<qr<<endl;
//     if(l==ql && r==qr){
//         tree[p]+=cc;
//         return ;
//     }
//     int mid = (l+r)>>1;
//     tag[p] = 1;
//     if(qr<=mid) modify(p<<1,l,mid,ql,qr,cc);
//     else if(ql>mid) modify(p<<1|1,mid+1,r,ql,qr,cc);
//     else{
//         modify(p<<1,l,mid,ql,mid,cc);
//         modify(p<<1|1,mid+1,r,mid+1,qr,cc);
//     }
// }
// inline int query(int p,int l,int r,int x){
//     if(l==r) return tree[p];
//     int mid = (l+r)>>1;
//     if(!tag[p]) return tree[p];
//     if(x<=mid) return tree[p]+query(p<<1,l,mid,x);
//     else return tree[p]+query(p<<1|1,mid+1,r,x);
// }
inline void add(int l,int r,int f){
    // cout<<"add "<<l<<' '<<r<<endl;
    for(int i=l;i<=m;i+=(i&-i)){
        // cout<<"tree "<<i<<" ++ "<<endl;
        tree[i]+=f;
    }
    for(int i =r+1;i<=m;i+=(i&-i)){
        // cout<<"tree "<<i<<" -- "<<endl;
        tree[i]-=f;
    }
}
inline int ask(int x){
    int ans;
    ans = 0;
    for(int i = x;i>0;i-=(i&-i)){
        ans+=tree[i];
    }
    // for(int i =x-1;i>0;i-=(i&-i)){
    //     ans-=tree[i];
    // }
    return ans;
    // return qq(x) - qq(x-1);
}
map<PII,int> ccm;
void read(){
    int l,r,t,nl,nr;
    RII(n,m);
    REP(i,n){
        RII(l,r);
        ccm[mp(l,r)]++;
    }
    SREP(f,ccm){
        l = nl = f.X.X;
        r = nr = f.X.Y;
        t = 1;
        nl = l;
        nr = r;
        while(1){
            add(nl,nr,f.Y);
            // modify(1,1,m,nl,nr,f.Y);
            if(nl==1) break;
            do{
                t = max(r/(nl-1),(l+(nl-2))/(nl-1));
                // t = r/(nl-1);
                nr = min(r/t,nl-1);
                nl = (l+(t-1))/t;
            }while(nl>nr);
        }
    }
}
void solve(){
    REP2(i,1,m){
        printf("%d\n",ask(i));
    }
}
int main(){
    int nn=1;
    // nn=rit();
    while(nn--){
        // while(cin>>n) 
            init(),read(),solve();
    }
    return 0;
}

Measured memory_bytes: 17280