#include <algorithm>
#include <cmath>
#include <complex>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>
#include <functional>
#include <cstring>
#include <regex>
#include <random>
#include <cassert>
#include <stack>
using namespace std;

#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define repr(i, s, n) for (int i = (s); i < (int)(n); i++)
#define revrep(i, n) for (int i = (n) - 1; i >= 0; i--)
#define revrepr(i, s, n) for (int i = (n) - 1; i >= s; i--)
#define debug(x) cerr << #x << ": " << x << "\n"
#define popcnt(x) __builtin_popcount(x)

using ll = long long;
using P = pair<int, int>;

template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; }

template<class T>
istream& operator >>(istream &is, vector<T> &v) {
    for (int i = 0; i < (int)v.size(); i++) cin >> v.at(i);
    return is;
}

template<class T, class U>
ostream& operator <<(ostream &os, pair<T, U> p) {
    cout << '(' << p.first << ", " << p.second << ')';
    return os;
}

template<class T>
void print(const vector<T> &v, const string &delimiter) { rep(i, v.size()) cout << (0 < i ? delimiter : "") << v.at(i); cout << endl; }

template<class T>
void print(const vector<vector<T>> &vv, const string &delimiter) { for (const auto &v: vv) print(v, delimiter); }

enum Kind { ADD, SUB, POINT };

struct Query {
    P cod;
    Kind k;
    int idx;
    bool operator <(const Query &another) { return cod == another.cod ? k == POINT : cod < another.cod; }
};

template<class T>
struct BIT {
    int n;
    T id;
    vector<T> dat;

    //[1, n]
    BIT(int n, T id): n(n), id(id), dat(n + 1, id) {}
    void init(int _n, T _id) { 
        n = _n;
        id = _id;
        dat.assign(_n, _id);
    }
    
    //[1, i]
    T sum(int i) const {
        T s = id;
        while (i > 0) {
            s += dat[i];
            i -= i & -i;
        }
        return s;
    }

    //1-indexed
    void add(int i, T x) {
        while (i <= n) {
            dat[i] += x;
            i += i & -i;
        }
    }
};

int main() {
    int n, m;
    cin >> n >> m;
    vector<int> l(n), r(n);
    rep(i, n) cin >> l[i] >> r[i];
    
    vector<Query> qs;
    rep(i, n) qs.push_back(Query{P(l[i], r[i]), Kind::POINT, -1});
    repr(d, 1, m + 1) {
        for (int i = 1; d * i <= m; i++) {
            int a = d * (i - 1), b = d * i;
            qs.push_back(Query{P(b, m), Kind::ADD, d});
            qs.push_back(Query{P(b, b - 1), Kind::SUB, d});
            qs.push_back(Query{P(a, m), Kind::SUB, d});
            qs.push_back(Query{P(a, b - 1), Kind::ADD, d});
        }
    }
    
    sort(qs.begin(), qs.end());
    
    BIT<int> bit(m + 1, 0);
    vector<int> ans(m + 1);
    for (const Query &q: qs) {
        if (q.k == Kind::POINT) {
            bit.add(q.cod.second, 1);
        }
        else if (q.k == Kind::ADD) {
            ans[q.idx] += bit.sum(q.cod.second);
        }
        else {
            ans[q.idx] -= bit.sum(q.cod.second);
        }
    }
    
    repr(d, 1, m + 1) cout << ans[d] << endl;
}