#include <bits/stdc++.h>
using namespace std;
const long long N = 20;
long long b[N];
void update(long long l, long long r) {
  for (; l < N; l += l & -l) {
    b[l]++;
  }
  r++;
  for (; r < N; r += r & -r) {
    b[r]--;
  }
}
long long soma(long long i) {
  long long ans = 0;
  for (; i > 0; i -= i & -i) ans += b[i];
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, m;
  cin >> n >> m;
  vector<pair<long long, pair<long long, long long> > > v;
  for (long long i = 0; i < (n); ++i) {
    long long x, y;
    cin >> x >> y;
    v.push_back(make_pair(y - x + 1, pair<long long, long long>(x, y)));
  }
  sort((v).begin(), (v).end());
  long long cur = 0;
  for (long long i = 1; i < (m + 1); ++i) {
    while (v[cur].first < i and cur < (long long)v.size()) {
      long long l = v[cur].second.first, r = v[cur].second.second;
      update(l, r);
      cur++;
    }
    long long k = 0;
    for (long long j = i; j <= m; j += i) {
      k += soma(j);
    }
    cout << k + n - cur << "\n";
  }
}
