#include <bits/stdc++.h>
using namespace std;
template <typename T>
bool maxup(T& a, T&& b) {
  if (a < b) {
    a = b;
    return true;
  };
}
template <typename T>
bool maxup(T& a, T& b) {
  if (a < b) {
    a = b;
    return true;
  };
}
template <typename T>
bool minup(T& a, T&& b) {
  if (a > b) {
    a = b;
    return true;
  };
}
template <typename T>
bool minup(T& a, T& b) {
  if (a > b) {
    a = b;
    return true;
  };
}
using VV = vector<vector<long long>>;
using V = vector<long long>;
using P = pair<long long, long long>;
using IP = pair<long long, P>;
template <typename T>
inline void input(vector<T>& v) {
  for (auto& x : v) cin >> x;
}
struct BIT {
  long long N;
  V v;
  BIT(long long n) : N(n + 1), v(n + 1) {}
  void add(long long idx, long long x) {
    for (long long i = idx + 1; i < N; i += i & -i) v[i] += x;
  }
  long long sum(long long idx) {
    long long sum = 0;
    for (long long i = idx + 1; i > 0; i -= i & -i) sum += v[i];
    return sum;
  }
};
signed main() {
  long long n, m;
  cin >> n >> m;
  using T = tuple<long long, long long, long long>;
  vector<T> v(n);
  for (signed i = signed(0); i < signed(n); i++) {
    long long l, r;
    cin >> l >> r;
    v[i] = {r - l + 1, l, r};
  }
  sort(begin(v), end(v));
  V anses(m);
  BIT bit(m + 2);
  long long pre = 0;
  for (signed d = signed(1); d < signed(m + 1); d++) {
    long long num = lower_bound(begin(v), end(v), T(d, 0, 0)) - v.begin();
    anses[d - 1] = n - num;
    for (signed i = signed(pre); i < signed(num); i++) {
      long long l, r;
      tie(ignore, l, r) = v[i];
      bit.add(l, 1);
      bit.add(r + 1, -1);
    }
    for (long long i = 0; i <= m; i += d) {
      anses[d - 1] += bit.sum(i);
    }
    pre = num;
  }
  for (long long x : anses) cout << x << endl;
  system("pause");
}
