#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void output(T a, int p = 0) {
  if (p)
    cout << fixed << setprecision(p) << a << "\n";
  else
    cout << a << "\n";
}
int main() {
  cin.tie(0);
  ios::sync_with_stdio(0);
  int N, M;
  cin >> N >> M;
  vector<int> plus(M + 5), minus(M + 5), plus_sum(M + 5), minus_sum(M + 5),
      sum(M + 5);
  for (int i = (int)(0); i < (int)(N); ++i) {
    int l, r;
    cin >> l >> r;
    plus[l]++, minus[r + 1]++;
  }
  for (int i = (int)(1); i < (int)(M + 3); ++i) {
    plus_sum[i] = plus_sum[i - 1] + plus[i];
    minus_sum[i] = minus_sum[i - 1] + minus[i];
    sum[i] = plus_sum[i] - minus_sum[i];
  }
  for (int i = (int)(1); i < (int)(M + 1); ++i) {
    int ans = 0;
    for (int j = i; j <= M; j += i) {
      if (j == i)
        ans += sum[j];
      else {
        ans += sum[j] - sum[j - i] + minus_sum[j] - minus_sum[j - i];
      }
    }
    cout << ans << endl;
  }
  return 0;
}
