#include <cstdio>
#include <algorithm>
#include <cmath>
#include <queue>
#include <vector>
#include <map>
#include <set>

using namespace std;

typedef pair<int , int> P2;
typedef pair<pair<int , int> , int> P3;
typedef pair<pair<int , int> , pair<int , int> > P4;
#define Fst first
#define Snd second
#define PB(a) push_back(a)
#define MP(a , b) make_pair((a) , (b))
#define M3P(a , b , c) make_pair(make_pair((a) , (b)) , (c))
#define M4P(a , b , c , d) make_pair(make_pair((a) , (b)) , make_pair((c) , (d)))
#define repp(i,a,b) for(int i = (int)(a) ; i < (int)(b) ; ++i)
#define repm(i,a,b) for(int i = (int)(a) ; i > (int)(b) ; --i)
#define repv(t,it,v) for(vector<t>::iterator it = v.begin() ; it != v.end() ; ++it)

const int BIT_MAX = 300010;

template <class T> class BIT{
	T x[BIT_MAX + 1];
	
public:
	
	BIT(){
		fill(x,x+BIT_MAX+1,0);
	}
	
	void add(int a , T b){
		for(; a <= BIT_MAX ; a += a & -a) x[a] += b;
	}
	
	T get(int a){
		T b = 0;
		for(; a > 0 ; a -= a & -a) b += x[a];
		return b;
	}
};

BIT<int> bit;
int N,M;
int ans[3333

int main(){
	scanf("%d%d" , &N , &M);
	repp(i,0,N){
		int l,r,x,y,s,t;
		scanf("%d%d" , &l , &r);
		x = l;
		y = r;
		repp(j,2,351){
			int s = (l-1)/j + 1;
			int t = r/j;
			if(x<t){
				x = s;
			} else {
				bit.add(x,1);
				bit.add(y+1,-1);
				x = s;
				y = t;
			}
			if(x<352) break;
		}
		bit.add(x,1);
		bit.add(y+1,-1);
		repp(j,1,351){
			if(r-l+1>=j || l % j > r % j || l % j == 0) ++ans[j];
		}
	}
	int z = min(351,M+1);
	repp(i,1,z){
		printf("%d\n" , ans[i]);
	}
	repp(i,351,M+1){
		printf("%d\n" , bit.get(i) - bit.get(i-1));
	}
	return 0;
}
