#include<iostream>
using namespace std;
int l[1000001],r[1000001],sum[1000001];
int main()
{
  int n,m,last;
  cin>>n>>m;
  for (int i=1;i<=n;++i)
    {
      cin>>l[i]>>r[i];
      l[i]--;
      for (int j=1;j<=l[i];j=last+1)
	{
	  last=min(l[i]/(l[i]/j),r[i]/(r[i]/j));
	  if (l[i]/j<r[i]/j)
	    {
	      sum[j]++;
	      sum[last+1]--;
	    }
	}
      sum[l[i]+1]++;
      sum[r[i]+1]--;
    }
  for (int i=1;i<=m;++i)
    {
      sum[i]+=sum[i-1];
      cout<<sum[i]<<endl;
    }
  return 0;
}