import std.stdio, std.string, std.conv;
import std.range, std.algorithm, std.array, std.math;

import std.typecons;
alias Seg = Tuple!(int, "l", int, "r", int, "len");

void main() {
    int n, m;
    scan(n, m);

    auto p = new Seg[](n);

    foreach (i ; 0 .. n) {
        int li, ri;
        scan(li, ri);
        p[i] = Seg(li, ri, ri - li + 1);
    }

    p.sort!"a.len < b.len"();

    writeln(n);

    //auto ft = FenwickTree(m + 2);
    auto sd = SqrtDecomp(m + 2);

    foreach (d ; 2 .. m + 1) {
        while (!p.empty && p.front.len < d) {
            //ft.add(p.front.l, 1);
            //ft.add(p.front.r + 1, -1);
            sd.add(p.front.l, 1);
            sd.add(p.front.r + 1, -1);
            p.popFront();
            n--;
        }

        int ans = n;

        for (int i = 0; i <= m; i += d) {
            ans += sd.sum(0, i + 1);
        }

        writeln(ans);
    }
}

struct SqrtDecomp {
    private {
        enum rt = 512;
        int N, K;
        int[] buck;
        int[] data;
    }

    this(int n) {
        N = n;
        K = (N + rt - 1) / rt;
        buck = new int[](K);
        data = new int[](K * rt);
    }

    void add(int i, int x) {
        data[i] += x;

        int k = i / rt;
        buck[k] = 0;
        foreach (j ; k * rt .. (k + 1) * rt) {
            buck[k] += data[j];
        }
    }

    int sum(int l, int r) {
        int res;

        foreach (k ; 0 .. K) {
            int bl = k * rt, br = (k + 1) * rt;
            if (r <= bl || br <= l) continue;
            if (l <= bl && br <= r) {
                res += buck[k];
            }
            else {
                foreach (j ; max(l, bl) .. min(r, br)) {
                    res += data[j];
                }
            }
        }

        return res;
    }
}


struct FenwickTree {
    private {
        int N;
        int[] data;
    }

    this(int n) {
        N = n;
        data = new int[](N + 1);
    }

    void add(int i, int x) {
        i++;
        while (i <= N) {
            data[i] += x;
            i += i & (-i);
        }
    }

    int sum(int r) {
        int res;
        while (r > 0) {
            res += data[r];
            r -= r & (-r);
        }
        return res;
    }
}


void scan(T...)(ref T args) {
    import std.stdio : readln;
    import std.algorithm : splitter;
    import std.conv : to;
    import std.range.primitives;

    auto line = readln().splitter();
    foreach (ref arg; args) {
        arg = line.front.to!(typeof(arg));
        line.popFront();
    }
    assert(line.empty);
}



void fillAll(R, T)(ref R arr, T value) {
    static if (is(typeof(arr[] = value))) {
        arr[] = value;
    }
    else {
        foreach (ref e; arr) {
            fillAll(e, value);
        }
    }
}
