#include <bits/stdc++.h>
 
using namespace std;
#define int long long


 const int MAX = 1001;
const int MOD = 1000000007;



signed main(){
    int n,m;
    cin>>n>>m;
    int l,r,t,ok,ng,mid;
    int ans[m+1]={},ans2[m+1]={};
    for(int i=0;i<n;i++){
        cin>>l>>r;
        for(int j=1;j<=sqrt(r);j++){
           
            if(r%j<=r-l){
                ans[j]++;
                 ok=r/j;
                 ng=r/(j+1);
                 if(ok>sqrt(r)&&(r-ok*j)<=r-l&&r/ok==j){
                 ans2[ok]--;
                 //cerr<<ok<<' ';
                 while(abs(ok-ng)>1){
                     mid=(ok+ng)/2;
                     if(mid>sqrt(r)&&(r-mid*j)<=r-l&&r/mid==j)ok=mid;
                     else ng=mid;
                 }
                 if(ng>sqrt(r))ans2[ng]++;
                 else ans2[signed(sqrt(r))]++;
                
                //cerr<<ng<<endl;
                 }
            }
        }
    }
    t=0;
    for(int i=1;i<=m;i++){
        t+=ans2[i-1];
      //  cerr<<ans[i]<<' '<<t<<endl;
        cout<<ans[i]+t<<endl;

    }

    

   return 0;
}