#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)){
                 ans2[ok]--;
                 ans2[max(r/(j+1),max((l-1)/j,signed(sqrt(r))))]++;
             //   cerr<<l/j<<endl;
                //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;
}