#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
const int N = int(3e5) + 10;
int a[N];
vector<int> v[N];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, m;
  cin >> n >> m;
  for (int i = (int)0; i < (int)n; i++) {
    int l, r;
    cin >> l >> r;
    a[l]++;
    a[r + 1]--;
    v[l].push_back(r + 1);
  }
  for (int i = (int)1; i < (int)N; i++) {
    a[i] = a[i] + a[i - 1];
  }
  for (int i = (int)1; i < (int)m + 1; i++) {
    int ans = a[i];
    set<int> s;
    for (auto w : v[i]) s.insert(w);
    for (int j = 2 * i; j <= m; j += i) {
      while (1) {
        if ((int)(s.size()) == 0) break;
        int u = *s.begin();
        if (u <= j)
          s.erase(s.begin());
        else
          break;
      }
      ans = ans + a[j] - (int)(s.size());
      for (auto w : v[j]) s.insert(w);
    }
    cout << ans << endl;
  }
  return 0;
}
