#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <iostream>
#include <algorithm>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#define rep(i,l,r) for(int i=(l);i<=(r);++i)
#define per(i,r,l) for(int i=(r);i>=(l);--i)
#define fo(i,l,r,x) for(int i=(l);i<=(r);i+=(x))
using namespace std;
const int maxn=4e5+10;
int n,m,b[maxn];
struct node{int l,r;}a[maxn];
inline bool operator <(node a,node b){return a.r-a.l<b.r-b.l;}
void add(int i,int x){for(;i<=m;i+=i&(-i)) b[i]+=x;}
int sum(int i){int ans=0;for(;i;i-=i&(-i)) ans+=b[i];return ans;}
int main(){
	scanf("%d%d",&n,&m);
	rep(i,1,n) scanf("%d%d",&a[i].l,&a[i].r);
	sort(a+1,a+n+1);int i=1;
	rep(d,1,m){
		while(i<=n&&a[i].r-a[i].l+1==d) add(a[i].l,1),add(a[i].r+1,-1),++i;
		int ans=n-i+1;
		fo(j,d,m,d) ans+=sum(j);
		printf("%d\n",ans);
	}
	return 0;
}