#include <cstdio>
#include <vector>
using namespace std;

int N, M, v[1100000], seen;
vector<int> range[100005];

void u(int n, int b, int t, int s, int e) {
    if (s >= t || e <= b) return;
    if (s <= b && e >= t) v[n] += 1;
    else u(2*n,b,(b+t)/2,s,e), u(2*n+1,(b+t)/2,t,s,e);
}

int q(int n, int b, int t, int x) {
    if (x < b || x >= t) return 0;
    return v[n] + (t-b>1 ? q(2*n,b,(b+t)/2,x) + q(2*n+1,(b+t)/2,t,x):0);
}

int main() {
    scanf("%d %d", &N, &M);
    for (int i = 0, l, r; i < N; i++) {
        scanf("%d %d", &l, &r);
        range[r-l+1].push_back(l);
    }
    for (int i = 1; i <= M; i++) {
        int o = N-seen;
        for (int j = i; o < N && j <= M; j += i) o += q(1,1,M+5,j);
        printf("%d\n", o);
        seen += range[i].size();
        for (auto it = range[i].begin(); it != range[i].end(); it++) u(1,1,M+5,*it,(*it)+i);
    }
}
