import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio, std.bitmanip;

class SegmentTree {
    int[] data, datb;
    int N, table_size;

    this(int n) {
        N = n;
        int table_size = (1 << 18) - 1;
        table_size.writeln;
        data = new int[](table_size);
        datb = new int[](table_size);
    }

    void add(int a, int b, int x, int k, int l, int r) {
        if (a <= l && r <= b) {
            data[k] += x;
        }
        else if (l < b && a < r) {
            datb[k] += (min(b, r) - max(a, l)) * x;
            add(a, b, x, k*2+1, l, (l + r) / 2);
            add(a, b, x, k*2+2, (l + r) / 2, r);
        }
    }

    int sum(int a, int b, int k, int l, int r) {
        if (b <= l|| r <= a) {
            return 0;
        }
        else if (a <= 1 && r <= b) {
            return data[k] * (r-l) + datb[k];
        }
        else {
            int res = (min(b, r) - max(a, l)) * data[k];
            res += sum(a, b, k*2+1, l, (l + r) / 2);
            res += sum(a, b, k*2+2, (l + r) / 2, r);
            return res;
        }

    }
}

void main() {
    int N, M;
    scanf("%d %d", &N, &M);

    auto sg = new SegmentTree(M+1);
    int l, r;

    foreach (i; 0..N) {
        scanf("%d %d", &l, &r);
        sg.add(l, r+1, 1, 0, 0, M+1);
    }

    foreach (i; 1..M+1) {
        int ans = 0;
        foreach (j; iota(i, M+1, i)) {
            j.writeln;
            ans += sg.sum(j, j+1, 0, 0, M+1);
        }
        ans.writeln;
    }
}
