/+ dub.sdl:
    name "A"
    dependency "dcomp" version=">=0.6.0"
+/

import std.stdio, std.range, std.algorithm, std.conv;
// import dcomp.scanner;
// import dcomp.container.simpleseg;

int main() {
    auto sc = new Scanner(stdin);
    int n, m;
    sc.read(n, m);
    auto seg = SimpleSeg!(int, (a,b)=>(a+b), 0)(m+1);
    int[] l = new int[n], r = new int[n];
    int[][] g = new int[][](m+1);
    foreach (i; 0..n) {
        sc.read(l[i], r[i]); l[i]--;
        int d = r[i]-l[i];
        g[d] ~= i;
    }
    int upC = n;
    foreach (d; 1..(m+1)) {
        foreach (i; g[d]) {
            upC--;
            seg[l[i]] = seg[l[i]]+1;
            seg[r[i]] = seg[r[i]]-1;
        }
        auto sm = upC + iota(0, m+2, d).map!(pos => seg.sum(0, pos)).sum;
        writeln(sm);
    }
    return 0;
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/scanner.d */
// module dcomp.scanner;

class Scanner {
    import std.stdio : File;
    import std.conv : to;
    import std.range : front, popFront, array, ElementType;
    import std.array : split;
    import std.traits : isSomeChar, isStaticArray, isArray; 
    import std.algorithm : map;
    File f;
    this(File f) {
        this.f = f;
    }
    string[] buf;
    private bool succ() {
        while (!buf.length) {
            if (f.eof) return false;
            buf = f.readln.split;
        }
        return true;
    }
    private bool readSingle(T)(ref T x) {
        if (!succ()) return false;
        static if (isArray!T) {
            alias E = ElementType!T;
            static if (isSomeChar!E) {
                //string or char[10] etc
                x = buf.front;
                buf.popFront;
            } else {
                static if (isStaticArray!T) {
                    //static
                    assert(buf.length == T.length);
                }
                x = buf.map!(to!E).array;
                buf.length = 0;                
            }
        } else {
            x = buf.front.to!T;
            buf.popFront;            
        }
        return true;
    }
    int read(T, Args...)(ref T x, auto ref Args args) {
        if (!readSingle(x)) return 0;
        static if (args.length == 0) {
            return 1;
        } else {
            return 1 + read(args);
        }
    }
}

unittest {
    import std.path : buildPath;
    import std.file : tempDir;
    import std.algorithm : equal;
    import std.stdio : File;
    string fileName = buildPath(tempDir, "kyuridenanmaida.txt");
    auto fout = File(fileName, "w");
    fout.writeln("1 2 3");
    fout.writeln("ab cde");
    fout.writeln("1.0 1.0 2.0");
    fout.close;
    Scanner sc = new Scanner(File(fileName, "r"));
    int a;
    int[2] b;
    char[2] c;
    string d;
    double e;
    double[] f;
    sc.read(a, b, c, d, e, f);
    assert(a == 1);
    assert(equal(b[], [2, 3]));
    assert(equal(c[], "ab"));
    assert(equal(d, "cde"));
    assert(e == 1.0);
    assert(equal(f, [1.0, 2.0]));
}
/* IMPORT /home/yosupo/Program/dcomp/source/dcomp/container/simpleseg.d */
// module dcomp.container.simpleseg;

// simpleなsegtree
// a op b op .. op x が求められる、遅延評価なし
// (T, op)はモノイドの必要がある、eはモノイド
struct SimpleSeg(T, alias op, T e) {
    const size_t n, sz;
    T[] d;
    @disable this();
    this(size_t n) {
        import std.algorithm : fill;
        import core.bitop : bsr;
        int lg = n.bsr;
        if ((2^^lg) < n) lg++;
        this.n = n;
        this.sz = 2^^lg;
        d = new T[](2*this.sz);
        d.fill(e);
    }
    T opIndex(int idx) {return d[idx+sz];}
    void opIndexAssign(T v, int idx) {
        import std.stdio : writeln;
        idx += sz;
        d[idx] = v;
        while (idx/2 >= 1) {
            idx /= 2;
            d[idx] = op(d[2*idx], d[2*idx+1]);
        }
    }
    //todo more beautiful?
    T sum(size_t a, size_t b, size_t l, size_t r, size_t k) {
        if (b <= l || r <= a) return e;
        if (a <= l && r <= b) return d[k];
        size_t md = (l+r)/2;
        return op(sum(a, b, l, md, 2*k),
            sum(a, b, md, r, 2*k+1));
    }
    //[a, b)
    T sum(size_t a, size_t b) {
        return sum(a, b, 0, sz, 1);
    }
    //todo formatspec?
    string toString() {
        import std.conv : to;
        return d[sz..sz+n].to!string;
    }
}
