#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;
    int ans[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]++;
                 t=r/j;
                while(t>sqrt(r)&&(r-t*j)<=r-l&&r/t==j){
                    ans[t]++;
                    t--;
                }
            }
        }
    }
    for(int i=1;i<=m;i++)cout<<ans[i]<<endl;

    

   return 0;
}