// Slower C++ solution:
#include <bits/stdc++.h>

using namespace std;

#define fi first

#define se second

typedef pair<int, int> Pi;



struct BIT {

  

  vector<int> sum;

  

  BIT (int sz)

  {

    sum.assign(++sz, 0);

  }

  

  int query(int k)

  {

    int ret = 0;

    for (; k > 0; k -= k & -k) ret += sum[k];

    return ret;

  }



  void add(int k, int x)

  {

    for (; k < sum.size(); k += k & -k) sum[k] += x;

  }

  

};



int main()

{

  int N, M;

  int A[300005], B[300005];

  Pi pmt[300005];

  

  cin >> N >> M;

  for (int i = 0; i < N; i++) {

    cin >> A[i] >> B[i]; B[i]++;

    pmt[i] = Pi(B[i] - A[i], i);

  }

  sort (pmt, pmt + N);

  

  int now = 0;

  BIT tree(M);

  for (int i = 1; i <= M; i++) {

    while (pmt[now].fi <= i && now < N) {

      int sec = pmt[now].se;

      int a = A[sec], b = B[sec];

      tree.add(a, 1); tree.add(b, -1);

      now++;

    }

    int ans = 0;

    for (int j = i; j <= M; j += i) ans += tree.query(j);

    cout << (N - now) + ans << endl;

  }

  

  return 0;

}


// Faster C++ solution for the same problem (measured speedup: 3.4947381141849414x):
#include <bits/stdc++.h>

using namespace std;



using ll = long long;

using Pi = pair<int, int>;

using Pl = pair<ll, ll>;

using vint = vector<int>;

using vll = vector<ll>;

template<typename T> using uset = unordered_set<T>;

template<typename T1, typename T2> using umap = unordered_map<T1, T2>;



constexpr int INF = (1 << 30) - 1;

constexpr ll LLINF = 1LL << 60;

constexpr int dy[] = {1, 0, -1, 0, 1, -1, -1, 1};

constexpr int dx[] = {0, 1, 0, -1, 1, 1, -1, -1};

constexpr char el = '\n';

constexpr int mod = 1000000007;



template<typename T> T gcd(T a, T b) { return (b ? gcd(b, a % b) : a); }

template<typename T> T lcm(T a, T b) { return (a / gcd(a, b) * b); }

template<typename T1, typename T2> inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2> inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }



template < typename T > 

struct BIT {

    vector < T > dat;



    BIT (int n) { dat.assign(n + 1, 0); }



    void add(int k, T x) {

        k++;

        while ( k < dat.size() ) dat[k] += x, k += k & -k;

    }



    T query(int k) {

        T sum = 0;

        k++;

        while ( k > 0 ) sum += dat[k], k -= k & -k;

        return ( sum );

    }



    int lower_bound(T x) {

        int l, r;

        l = -1, r = dat.size();

        while ( l + 1 < r ) {

            int m = (l + r) / 2;

            if ( query(m) >= x ) r = m;

            else l = m;

        }

        return ( r );

    }

};



int main() {

    int N, M;

    cin >> N >> M;



    BIT<int> tree(M + 2);

    vint L(N), R(N);

    vector<Pi> length(N);

    for (int i = 0; i < N; i++) {

        cin >> L[i] >> R[i];

        length[i] = Pi(R[i] - L[i] + 1, i);

    }

    sort(begin(length), end(length)); 

    int cur = 0;

    for (int i = 1; i <= M; i++) {

        while (cur < N && length[cur].first < i) {

            auto idx = length[cur].second;

            tree.add(L[idx], 1);

            tree.add(R[idx] + 1, -1);

            cur++;

        }

        int cnt = 0;

        for (int j = 0; j <= M; j += i) {

            cnt += tree.query(j);

        }

        cout << (N - cur) + cnt << el;

    }



    return ( 0 );

}