#include<cstdio>
#include<cstring>
#include<algorithm>
#include<iostream>
#include<string>
#include<vector>
#include<stack>
#include<bitset>
#include<queue>
#include<climits>
#include<cstdlib>
#include<cmath>
#include<set>
#include<list>
#include<deque>
#include<map>
using namespace std;
#define ll long long
#define SET(x,a) memset(x,a,sizeof(x))
#define pb push_back
#define pii pair<int,int>
#define fi first
#define se second
#define IN(x) freopen(x,"r",stdin)
#define OUT(x) freopen(x,"w",stdout)
#define pi = 3.14159265354
#define INF 0x3f3f3f3f
inline void read(int &x){
    char c; int flag = 1;
    while((c = getchar()) < '0' || c > '9')
        if(c == '-') flag *= -1;
    x = c - '0';
    while((c = getchar()) >= '0' && c <= '9')
        x = x*10+c-'0';
    x *= flag;
    return;
}
inline void read(ll &x){
    char c; int flag = 1;
    while((c = getchar()) < '0' || c > '9')
        if(c == '-') flag *= -1;
    x = c - '0';
    while((c = getchar()) >= '0' && c <= '9')
        x = x*10+c-'0';
    x *= flag;
    return;
}
int bit[300005], n, m;
struct obj{
	int l, r, len;
	bool operator<(obj a){
		return len < a.len;
	}
}arr[300005];

int query(int x){
	int ret = 0;
	for(;x; x -= x & (-x)) ret += bit[x];
	return ret;
}
void ins(int x,int val){
	int ret = 0;
	for(;x <= m; x += x & (-x)) bit[x] += val;
	return;
}
int main(){
	read(n); read(m);
	for(int i = 1; i <= n; ++i){
		int l ,r ; read(l); read(r);
		arr[i] = {l,r,r-l+1};
	}
	sort(arr+1,arr+1+n);
//	cout << n << endl;
	for(int i = 1, j = 1; i <= m; ++i){
		if(j <= n && arr[j].len < i){
			ins(arr[j].l,1);
			ins(arr[j].r+1,-1);
			++j;
		}
//		cout << j << endl;
		int ans = n - j + 1;
		for(int k = i; k <= m; k += i)
			ans += query(k);
		cout << ans << endl;
	}
}

