import std.algorithm;
import std.array;
import std.ascii;
import std.container;
import std.conv;
import std.math;
import std.numeric;
import std.range;
import std.stdio;
import std.string;
import std.typecons;
int size(T)(in T s) { return cast(int)s.length; }

class RangeSumQuery2 {
    // root縺ｮindex縺ｯ1
    int N;
    int orgN;
    long[] V, L;
    this(int N) {
        import core.bitop;
        this.orgN = N;
        this.N = 1 << (bsr(N - 1) + 1);
        this.V = new long[2 * this.N];
        this.L = new long[2 * this.N];
    }
    /* [s, t)縺ｫ荳讒倥↓x繧貞刈邂・*/
    void add(long x, int s, int t) { return add(x, s, t, 0, N, 1); }
    void add(long x, int s, int t, int a, int b, int k) {
        if (t <= a || b <= s) return;
        if (s <= a && b <= t) {
            L[k] += x;
            return;
        }
        if (s < b || a < t) {
            V[k] += (min(t, b) - max(s, a)) * x;
            if (b - a == 1) return;
            int m = (a + b) / 2;
            add(x, s, t, a, m, k * 2);
            add(x, s, t, m, b, k * 2 + 1);
        }
    }
    /* [s, t)縺ｮ蜥・*/
    long query(int s, int t) const { return query(s, t, 0, N, 1); }
    long query(int s, int t, int a, int b, int k) const {
        if (t <= a || b <= s) return 0;
        if (s <= a && b <= t) return V[k] + L[k] * (b - a);
        int m = (a + b) / 2;
        return (min(t, b) - max(s, a)) * L[k] +
            query(s, t, a, m, k * 2) +
            query(s, t, m, b, k * 2 + 1);
    }
    string dump() const {
        auto buf = appender!string();
        buf.put("RSQ2[");
        for (int i = 0; i < orgN; i++) {
            buf.put(format("%4d", this.query(i, i + 1)));
        }
        buf.put("]");
        return buf.data;
    }
};

void main() {
    int N, M; readf("%d %d\n", &N, &M);
    auto L = new int[N];
    auto R = new int[N];
    foreach (i; 0 .. N) {
        int l, r; readf("%d %d\n", &l, &r);
        L[i] = l;
        R[i] = r;
    }
    auto I = iota(0, N, 1).array.sort!((i, j) => R[i] - L[i] < R[j] - L[j]).array;
    int i = 0;
    long base = N;
    auto rsq = new RangeSumQuery2(M + 1);
    for (int t = 1; t <= M; t++) {
        long count = base;
        for (int x = t; x <= M; x += t) {
            count += rsq.query(x, x + 1);
        }
        while (i < N && R[I[i]] - L[I[i]] + 1 == t) {
            base--;
            rsq.add(1, L[I[i]], R[I[i]] + 1);
            i++;
        }
        writeln(count);
    }
}
